Json module in python

technical talkiess
0

 Json module:- 

import json


data = '{"name":"vishal","age":25,"test":"test"}'

# javascript object me convert kar deta hai

# print(json.loads(data))


data1 = {


    "name":"vishal",

    "cars":['sumova','tata','dil','best','test'],

    "test":('test',540,False)

}

# ye javascript ke object ke according object bana deta hai

print(json.dumps(data1))
Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)