from django.core import serializers

def json_for_model_instance(request, pk):
    instance = YourModel.objects.get(pk=pk)
serialized_instance = serializers.serialize('json', [instance])
In Django : How to serialize dict object to json?