Answers for "convert python dictionary to javascript json"

24

python dictionary to json

import json

appDict = {
  'name': 'messenger',
  'playstore': True,
  'company': 'Facebook',
  'price': 100
}
app_json = json.dumps(appDict)
print(app_json)
Posted by: Guest on April-06-2020
0

python dictionary to json

import json

# json -> string
j1 = {"name": "steve", "age": 64}
s1 = json.dumps(j)

# string -> json
s2 = '{"name": "steve", "age": 64}'
j2 = json.loads(s)
Posted by: Guest on January-06-2022

Code answers related to "convert python dictionary to javascript json"

Code answers related to "Javascript"

Browse Popular Code Answers by Language