Parsing json and searching through it

后端 未结 5 506
轮回少年
轮回少年 2020-12-02 23:26

I have this code

import json
from pprint import pprint
json_data=open(\'bookmarks.json\')
jdata = json.load(json_data)
pprint (jdata)
json_data.close()
         


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 00:03

    You can use jsonpipe if you just need the output (and more comfortable with command line):

    cat bookmarks.json | jsonpipe |grep uri
    

提交回复
热议问题