projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72fc8c5
)
web: indent the JSON to make it easier for humans to read, but slightly larger
author
Brian Warner
<warner@lothar.com>
Sun, 8 Jul 2007 07:23:23 +0000
(
00:23
-0700)
committer
Brian Warner
<warner@lothar.com>
Sun, 8 Jul 2007 07:23:23 +0000
(
00:23
-0700)
src/allmydata/webish.py
patch
|
blob
|
history
diff --git
a/src/allmydata/webish.py
b/src/allmydata/webish.py
index 187c05d13c797a49d5a91a63f5ad783edb84357e..ad7ed5a263498d0350e224ec8513b0452b534f4f 100644
(file)
--- a/
src/allmydata/webish.py
+++ b/
src/allmydata/webish.py
@@
-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