def to_json(value):
    def replace(match):
        return _js_quote[match.group(0)]
    text = dumps(value, sort_keys=True, separators=(',', ':'))
    return _js_quote_re.sub(replace, text)
Encode `value` to JSON.
dataset/ETHPy150Open edgewall/trac/trac/util/presentation.py/to_json