Python has the json
module for this purpose
import json
s = json.loads('{"retCode":1,"retMsg":"Success","data":[{"secID":"000002.XSHE","ticker":"000002","exchangeCD":"XSHE","ListSectorCD":1,"ListSector":"主板","transCurrCD":"CNY","secShortName":"万科A","secFullName":"万科企业股份有限公司","listStatusCD":"L","listDate":"1991-01-29","equTypeCD":"A","equType":"沪深A股","exCountryCD":"CHN","partyID":3,"totalShares":11039152000,"nonrestFloatShares":11024120600,"nonrestfloatA":9709165100,"officeAddr":"广东省深圳市盐田区大梅沙环梅路33号万科中心","primeOperating":"房地产业务及投资零售业务。","endDate":"2017-06-30","TShEquity":161157756356.52}]}')
print(s["data"])
In Python 2 would print
[{u'primeOperating': u'\u623f\u5730\u4ea7\u4e1a\u52a1\u53ca\u6295\u8d44\u96f6\u552e\u4e1a\u52a1\u3002', u'ListSectorCD': 1, u'exchangeCD': u'XSHE', u'secID': u'000002.XSHE', u'secFullName': u'\u4e07\u79d1\u4f01\u4e1a\u80a1\u4efd\u6709\u9650\u516c\u53f8', u'nonrestFloatShares': 11024120600, u'endDate': u'2017-06-30', u'officeAddr': u'\u5e7f\u4e1c\u7701\u6df1\u5733\u5e02\u76d0\u7530\u533a\u5927\u6885\u6c99\u73af\u6885\u8def33\u53f7\u4e07\u79d1\u4e2d\u5fc3', u'listDate': u'1991-01-29', u'secShortName': u'\u4e07\u79d1A', u'TShEquity': 161157756356.52, u'equType': u'\u6caa\u6df1A\u80a1', u'nonrestfloatA': 9709165100, u'listStatusCD': u'L', u'ListSector': u'\u4e3b\u677f', u'partyID': 3, u'totalShares': 11039152000, u'transCurrCD': u'CNY', u'exCountryCD': u'CHN', u'ticker': u'000002', u'equTypeCD': u'A'}]
And in Python 3 that supports Unicode out of the box it would print
[{'nonrestfloatA': 9709165100, 'listDate': '1991-01-29', 'officeAddr': '广东省深圳市盐田区大 梅沙环梅路33号万科中心', 'ListSectorCD': 1, 'secShortName': '万科A', 'primeOperating': '房地产业务及投资零售业务。', 'secFullName': '万科企业股份有限公司', 'TShEquity': 161157756356.52, 'exCountryCD': 'CHN', 'nonrestFloatShares': 11024120600, 'exchangeCD': 'XSHE', 'equType': '沪深A 股', 'secID': '000002.XSHE', 'ticker': '000002', 'endDate': '2017-06-30', 'transCurrCD': 'CNY', 'ListSector': '主板', 'equTypeCD': 'A', 'partyID': 3, 'listStatusCD': 'L', 'totalShares': 11039152000}]
Note that the order of the elements in the serialized dictionary has changed between the two Python versions, but the dictionary is the same.
To access individual items inside the "data" block use the [0]
descriptor to extract the dictionary out of the block and respective descriptor. For example
print(s["data"][0]["secID"])
would print
000002.XSHE