I am beginner to working with JSON, and now i'm gonna play it with Python. Recently i have make code like this:
import json
def product():
itemId = 84576454
itemName = 'FGX Flannel Shirt'
price = 195000
availableColorAndSize = {
'color': {'blue-black': ['M', 'L', 'XL'],
'black-white': ['L']}
}
freeShiping = False
The output file should look something like this:
{"Stuff":{
"id":84576454,
"name":"Shoes",
"cost":431200,
"color_and_size": {
"color": {
"brown":["XL", "XXL", "M"],
"green":["XXL"]
}
}
}
}
Before i have follow this one: Store Python function in JSON But i'm still confused and not sure how to return that function to make a JSON.