try to correct json serialisatio,n V00.08
authorymh <ymh.work@gmail.com>
Mon, 01 Feb 2010 02:18:23 +0100
changeset 20 4834a1f12295
parent 19 8a2f6d79fd63
child 21 28c536d35d6e
child 23 f6c33b35f132
try to correct json serialisatio,n
web/blinkster/__init__.py
web/blinkster/views.py
--- a/web/blinkster/__init__.py	Fri Jan 29 05:57:40 2010 +0100
+++ b/web/blinkster/__init__.py	Mon Feb 01 02:18:23 2010 +0100
@@ -1,3 +1,3 @@
-VERSION = (0,7)
+VERSION = (0,8)
 
 VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION)))
--- a/web/blinkster/views.py	Fri Jan 29 05:57:40 2010 +0100
+++ b/web/blinkster/views.py	Mon Feb 01 02:18:23 2010 +0100
@@ -15,6 +15,7 @@
 import blinkster
 import re
 import urllib2
+import blinkster.utils.log
 
 def serialize_queryset_to_json(response, obj_list, extra=None):
     objs = {
@@ -24,7 +25,10 @@
     if extra:
         objs = dict(objs, **extra)
 
-    simplejson.dump(objs, response, cls=DjangoJSONEncoder,ensure_ascii=False, indent=4)
+    #blinkster.utils.log.debug("before views dumps JSON RES : " + repr(objs))
+    res = simplejson.dumps(objs, cls=DjangoJSONEncoder,ensure_ascii=False, indent=4)
+    #blinkster.utils.log.debug("views dumps JSON RES : " + res)
+    response.write(res)
     return response
 
 def roi_list(request):