Is Google data source JSON not valid?

纵饮孤独 提交于 2019-12-03 16:05:43

It is considered to be invalid JSON without the string keys.

{id:'name',label:'Name',type:'string'}

must be:

{'id':'name','label':'Name','type':'string'}

According to the Google Data Source page, they're returning invalid JSON. They don't specifically say it, but all their examples lack quotes on the keys.

Here is a fairly complete list of JSON processors for Python which goes into detail about what formats they support, and how well. Most don't support non-string keys, but it appears that demjson will convert it.

easy_install demjson
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!