import json
from django.http import HttpResponse

def render_json(wrapper):

    def wrappered(*args, **argv):
        json_data = wrapper(*args, **argv)

        data = HttpResponse(json.dumps(json_data))
        return data

    return wrappered
