mirror of
https://github.com/OpenVPN/openvpn.git
synced 2025-05-09 21:51:05 +08:00

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)
11 lines
237 B
Python
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)
|