def marshal_json(
    obj,
    types=JSON_TYPES,
    fields=None,
):
    """ Recursively marshal a Python object to a JSON-compatible dict
        that can be passed to json.{dump,dumps}, a web client,
        or a web server, etc...

    Args:
        obj:    object, It's members can be nested Python
                objects which will be converted to dictionaries
        types:  tuple-of-types, The JSON primitive types, typically
                you would not change this
        fields: None-list-of-str, Explicitly marshal only these fields
    Returns:
        dict
    """
    return marshal_dict(
        obj,
        types,
        fields=fields,
    )
Recursively marshal a Python object to a JSON-compatible dict
        that can be passed to json.{dump,dumps}, a web client,
        or a web server, etc...

    Args:
        obj:    object, It's members can be nested Python
                objects which will be converted to dictionaries
        types:  tuple-of-types, The JSON primitive types, typically
                you would not change this
        fields: None-list-of-str, Explicitly marshal only these fields
    Returns:
        dict