openvpn/win/js.py
Samuli Seppänen f05b6d3302 Change all CRLF linefeeds to LF linefeeds
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit 6b2883a637fe73492f09816ee95b00c1b88d5fcb)
2011-04-14 16:38:45 +02:00

11 lines
237 B
Python

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)