JSON is the text format most web APIs and many exports use. It looks a lot like Python: objects in braces become dictionaries, arrays in brackets become lists, and true, false and null become True, False and None.
import json
data = json.loads(text) # JSON text to Python
text = json.dumps(data, indent=2) # Python to JSON text
For files, json.load(f) reads and json.dump(data, f, indent=2) writes.
Real JSON is nested, so you reach a value by chaining keys and positions: data["customer"]["address"]["city"], or data["lines"][0]["sku"]. When a field is sometimes missing, .get() avoids a KeyError.
JSON is stricter than Python: names and text need double quotes, and trailing commas aren't allowed. str(data) isn't JSON, because it writes single quotes and True, so always use json.dumps().