json

#! /usr/bin/env python
#coding=utf-8
import json
f = open(r'D:\test\file.txt','rb')
w =f.read()
f.close()
jsonDic = eval(w)
locations = json.loads(jsonDic)
for location in locations:

a = location["time-series-group"]["appId"]
b = location["data-points"]["total"]
inta = a +"\t"+ b +"\n"
print(inta)
posted @ 2017-09-07 12:44  zhang.ning  阅读(161)  评论(0编辑  收藏  举报