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 to print all of the JSON data:
import json
from pprint import pprint
…
I have JSON data stored in the variable data.
I want to write this to a text file for testing so I don't have to grab the data from the server each time.
Currently, I am trying this:
obj = open(…
I have a JSON file that is a mess that I want to prettyprint. What's the easiest way to do this in Python?
I know PrettyPrint takes an "object", which I think can be a file, but I don't know …