mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
web: indent the JSON to make it easier for humans to read, but slightly larger
This commit is contained in:
parent
72fc8c5cb8
commit
0395ad76eb
@ -308,7 +308,7 @@ class FileJSONMetadata(rend.Page):
|
||||
'uri': file_uri,
|
||||
'size': pieces['size'],
|
||||
})
|
||||
return JSONEncoder().encode(data)
|
||||
return JSONEncoder(indent=1).encode(data)
|
||||
|
||||
class FileURI(FileJSONMetadata):
|
||||
def renderNode(self, filenode):
|
||||
@ -412,7 +412,7 @@ class DirectoryJSONMetadata(rend.Page):
|
||||
'uri': node.get_uri(),
|
||||
}
|
||||
data = ("dirnode", contents)
|
||||
return JSONEncoder().encode(data)
|
||||
return JSONEncoder(indent=1).encode(data)
|
||||
d.addCallback(_got)
|
||||
return d
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user