mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 21:43:09 +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,
|
'uri': file_uri,
|
||||||
'size': pieces['size'],
|
'size': pieces['size'],
|
||||||
})
|
})
|
||||||
return JSONEncoder().encode(data)
|
return JSONEncoder(indent=1).encode(data)
|
||||||
|
|
||||||
class FileURI(FileJSONMetadata):
|
class FileURI(FileJSONMetadata):
|
||||||
def renderNode(self, filenode):
|
def renderNode(self, filenode):
|
||||||
@ -412,7 +412,7 @@ class DirectoryJSONMetadata(rend.Page):
|
|||||||
'uri': node.get_uri(),
|
'uri': node.get_uri(),
|
||||||
}
|
}
|
||||||
data = ("dirnode", contents)
|
data = ("dirnode", contents)
|
||||||
return JSONEncoder().encode(data)
|
return JSONEncoder(indent=1).encode(data)
|
||||||
d.addCallback(_got)
|
d.addCallback(_got)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user