# -*- coding: utf-8 -*-
import json
json_d = json.loads('{"status":"OK","msg":"Server is OK!"}')
print json_d
print json_d["status"]
print json_d["msg"]
>>> ================================ RESTART ================================
>>>
{u'status': u'OK', u'msg': u'Server is OK!'}
OK
Server is OK!
Python操作json数据示例
文章链接:https://www.ipaddr.host/python-json.html
码字不易,转载请注明本文出处及文章链接。
码字不易,转载请注明本文出处及文章链接。
这篇文章还没有人留言,快来抢沙发吧。