blob: d1d4db3a8ef001c6feda8d79e9772c1b2fc1851f (
plain)
1
2
3
4
5
6
7
8
9
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)
|