diff options
Diffstat (limited to 'win/js.py')
-rw-r--r-- | win/js.py | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1,10 +1,10 @@ -import json
-
-# usage:
-# print JSON().encode(kv)
-
-class JSON(json.JSONEncoder):
- def __init__(self, **kwargs):
- args = dict(sort_keys=True, indent=2)
- args.update(kwargs)
- json.JSONEncoder.__init__(self, **args)
+import json + +# usage: +# print JSON().encode(kv) + +class JSON(json.JSONEncoder): + def __init__(self, **kwargs): + args = dict(sort_keys=True, indent=2) + args.update(kwargs) + json.JSONEncoder.__init__(self, **args) |