format_json API documentation

# Module format_json

Show source.

    import json

    def deserialize(data):
        """
    Required for a data format plugin. Converts JSON into the Python objects used by `sofine`.
    """
        return json.loads(data)

    def serialize(data):
        """
    Required for a data format plugin. Converts Python objects used by `sofine` into JSON.
    """
        return json.dumps(data)

    def get_content_type():
        """
    Required for a data format plugin. Returns the value for the HTTP Content-Type header.
    """
        return 'application/json'

## Functions

def deserialize(

data)

Required for a data format plugin. Converts JSON into the Python objects used by `sofine`.

Show source.

    def deserialize(data):
        """
    Required for a data format plugin. Converts JSON into the Python objects used by `sofine`.
    """
        return json.loads(data)

def get_content_type(

)

Required for a data format plugin. Returns the value for the HTTP Content-Type header.

Show source.

    def get_content_type():
        """
    Required for a data format plugin. Returns the value for the HTTP Content-Type header.
    """
        return 'application/json'

def serialize(

data)

Required for a data format plugin. Converts Python objects used by `sofine` into JSON.

Show source.

    def serialize(data):
        """
    Required for a data format plugin. Converts Python objects used by `sofine` into JSON.
    """
        return json.dumps(data)

Documentation generated by `pdoc` 0.2.4. pdoc is in the public domain with the UNLICENSE.