Commits

Wojciech Malinowski  committed 9bf05b2

json library is in the standard lib (Python >=2.6) and can be used without installing it separately

  • Participants
  • Parent commits 8e3f507

Comments (0)

Files changed (2)

File WebKit/Examples/JSONRPCClient.py

 try:
     import simplejson
 except ImportError:
-    simplejson = None
+    try:
+        import json as simplejson
+    except ImportError:
+        simplejson = None
 
 from ExamplePage import ExamplePage
 

File WebKit/JSONRPCServlet.py

 try:
     import simplejson
 except ImportError:
-    print "ERROR: simplejson is not installed."
-    print "Get it from http://cheeseshop.python.org/pypi/simplejson"
+    try:
+        import json as simplejson
+    except ImportError:
+        print "ERROR: simplejson is not installed."
+        print "Get it from http://cheeseshop.python.org/pypi/simplejson"
 
 from MiscUtils import StringIO
 from HTTPContent import HTTPContent