]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
web: indent the JSON to make it easier for humans to read, but slightly larger
authorBrian Warner <warner@lothar.com>
Sun, 8 Jul 2007 07:23:23 +0000 (00:23 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 8 Jul 2007 07:23:23 +0000 (00:23 -0700)
src/allmydata/webish.py

index 187c05d13c797a49d5a91a63f5ad783edb84357e..ad7ed5a263498d0350e224ec8513b0452b534f4f 100644 (file)
@@ -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