python使用simplejson解析示例

#!/usr/bin/env python

import simplejson;

#read string
date='[{"name":"Column_owner","point":"AKESH2880153908"},{"name":"Column_name","point":"wiken"}]';
jsonVal = simplejson.loads(date)

for val in jsonVal:
    print val["name"]
    print val["point"]

#read form file
jsonVal = simplejson.load(file('./a.json'));
for val in jsonVal:
    print(val);
    print("****");
 

你可能感兴趣的:(json,python)