Python: json object_hook object_paire_hook

 

 

data = '[{"foo": "bar", "foo": "baz", "b": 99}]'

json.loads(data, object_hook=print)
json.loads(data, object_pairs_hook=print)

 

 

posted @ 2023-06-13 14:43  ascertain  阅读(43)  评论(0编辑  收藏  举报