Decorator used to output prettified JSON.

    ``response.content_type`` is set to ``application/json; charset=utf-8``.

    Args:
        fn (fn pointer): Function returning any basic python data structure.

    Returns:
        str: Data converted to prettified JSON.

def pretty_dump(fn):
    """
    Decorator used to output prettified JSON.

    ``response.content_type`` is set to ``application/json; charset=utf-8``.

    Args:
        fn (fn pointer): Function returning any basic python data structure.

    Returns:
        str: Data converted to prettified JSON.
    """
    @wraps(fn)
    def pretty_dump_wrapper(*args, **kwargs):
        response.content_type = "application/json; charset=utf-8"

        return json.dumps(
            fn(*args, **kwargs),

            # sort_keys=True,
            indent=4,
            separators=(',', ': ')
        )

    return pretty_dump_wrapper