I have this JSON in a file:
{
"maps": [
{
"id": "blabla",
"iscategorical": "0"
},
{
"id": "blabla",
"iscategorical": "0"
}
],
"masks": [
"id": "valore"
],
"om_points": "value",
"parameters": [
"id": "valore"
]
}
I wrote this script which prints all of the json text:
json_data=open(file_directory).read()
data = json.loads(json_data)
pprint(data)
How can I parse the file and extract single values?
转载于:https://stackoverflow.com/questions/2835559/parsing-values-from-a-json-file