我得到这个短结果当过功能processOutput(output)
被称为大厦嵌套的JSON对象
output = {'LEND': '0', 'LINK': 'Xx', 'REND': '4', 'RULE': ''}
假设这个函数调用三次,然后导致JSON看起来应该像
{ 'object[0]' : {'LEND': '0', 'LINK': 'Xx', 'REND': '4', 'RULE': ''},
'object[1]' : {'LEND': '0', 'LINK': 'Xa', 'REND': '3', 'RULE': 'two'},
'object[2]' : {'LEND': '0', 'LINK': 'Xz', 'REND': '12', 'RULE': ''}
}
,这样我可以访问json的值如下object[0]['LINK']
等等
def printOutput(self, processed_output):
#processed_output is output.
请问你试过什么? – Nilesh 2014-11-04 09:28:28