Our js-programmer asked me to return the exact JSON format data instead of a json-encoded string to her.
Below is the solution.(This will return an object that can be used/viewed straightly in the browser)
import json
from xxx.models import alert
from django.core import serializers
def test(request):
alert_list = alert.objects.all()
tmpJson = serializers.serialize("json",alert_list)
tmpObj = json.loads(tmpJson)
return HttpResponse(json.dumps(tmpObj))