(val = None, **kwargs)
return json.dumps(val or kwargs)
Creates JSON string from Python object.

    >>> json_encode({'a': 1})
    '{"a": 1}'
    >>> json_encode('a')
    '"a"'
    >>> json_encode(['a'])
    '["a"]'
    >>> json_encode(a=1)
    '{"a": 1}'
Creates JSON string from Python object.
Creates JSON string from Python object .
def json_encode(val = None, **kwargs):
    """Creates JSON string from Python object.

    >>> json_encode({'a': 1})
    '{"a": 1}'
    >>> json_encode('a')
    '"a"'
    >>> json_encode(['a'])
    '["a"]'
    >>> json_encode(a=1)
    '{"a": 1}'
    """
    return json.dumps(val or kwargs)
def json_encode ( val = None , * * kwargs ) : return json . dumps ( val or kwargs )