import six
import json


def json_response(method):
    """Decorator to make json response."""
    @six.wraps(method)
    def inner(*args, **kwargs):
        return (
            json.dumps(method(*args, **kwargs)),
            200,
            {'Content-Type': 'application/json'}
        )
    return inner