开发者

How can I use json module in google app engine? [duplicate]

开发者 https://www.devze.com 2022-12-24 05:46 出处:网络
This question already has answers here: 开发者_开发技巧 Closed 11 years ago. Possible Duplicate: How can I parse JSON in Google App Engine?
This question already has answers here: 开发者_开发技巧 Closed 11 years ago.

Possible Duplicate:

How can I parse JSON in Google App Engine?

json module was added in python 2.6 but GAE supports 2.5 only.

How can I use it there?


Well you wotn be able to use the standard python library, you will have to use some third party lib such as

  • jyson or
  • simplejson

At least simplejson works on python 2.4


You can try using yaml module (which is included in GAE) as JSON parser. YAML in recent version is superset of JSON.

>>> import yaml
>>> yaml.load('[false, null, {"x": 1}]')
[False, None, {'x': 1}]


You can try using django.utils.simplejson

0

精彩评论

暂无评论...
验证码 换一张
取 消