From 0395ad76eb94fa5f2b28cea92052b4ca83368cd4 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sun, 8 Jul 2007 00:23:23 -0700 Subject: [PATCH] web: indent the JSON to make it easier for humans to read, but slightly larger --- src/allmydata/webish.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index 187c05d1..ad7ed5a2 100644 --- 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 -- 2.45.2