I have this JSON in a file:
{
\"maps\": [
{
\"id\": \"blabla\",
\"iscategorical\
As a python3 user,
The difference between load
and loads
methods is important especially when you read json data from file.
As stated in the docs:
json.load:
Deserialize fp (a .read()-supporting text file or binary file containing a JSON document) to a Python object using this conversion table.
json.loads:
json.loads: Deserialize s (a str, bytes or bytearray instance containing a JSON document) to a Python object using this conversion table.
json.load method can directly read opened json document since it is able to read binary file.
with open('./recipes.json') as data:
all_recipes = json.load(data)
As a result, your json data available as in a format specified according to this conversion table:
https://docs.python.org/3.7/library/json.html#json-to-py-table