V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
zungmou
V2EX  ›  Python

Python 之 json 库,如何解码非标准的 json 字符串

  •  
  •   zungmou · 2016-06-30 13:33:32 +08:00 · 4294 次点击
    这是一个创建于 2872 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如下所示,某服务器返回的 json 字段没有用引号包括,导致 json 库的 loads 方法无法正常加载,请问 python 高手,如果不去处理这段文本,能解决吗?

    [ { name: "join", age: "16" } ]

    2 条回复    2016-06-30 13:45:14 +08:00
    zungmou
        2
    zungmou  
    OP
       2016-06-30 13:45:14 +08:00
    @cloverstd Thank you very much!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2728 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 02:15 · PVG 10:15 · LAX 19:15 · JFK 22:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.