# json in Python

import json

# some json
x = '{"name":"john", "age":30, "city":"New York"}'

# parse x:
y = json.loads(x)

# the result is a Python dictionary
print(y)

# convert the other way around

xx = {
    'name': 'john',
    'age':30,
    'city':'New York'
}

yy = json.dumps(xx)

print(yy)

# you could also convert other types as well
print(json.dumps(31.44))

# Python | Json
# dict -> Object
# list -> Array
# tuple -> Array
# str -> String
# int -> Number
# float -> Number
# True -> true
# False ->  false
# None -> null
bd1100cd59836ad74f4f99df937535700dc84051
<mask token>

<mask token>
print(y)
<mask token>
print(yy)
print(json.dumps(31.44))

<mask token>
x = '{"name":"john", "age":30, "city":"New York"}'
y = json.loads(x)
print(y)
xx = {'name': 'john', 'age': 30, 'city': 'New York'}
yy = json.dumps(xx)
print(yy)
print(json.dumps(31.44))

import json
x = '{"name":"john", "age":30, "city":"New York"}'
y = json.loads(x)
print(y)
xx = {'name': 'john', 'age': 30, 'city': 'New York'}
yy = json.dumps(xx)
print(yy)
print(json.dumps(31.44))

# json in Python

import json

# some json
x = '{"name":"john", "age":30, "city":"New York"}'

# parse x:
y = json.loads(x)

# the result is a Python dictionary
print(y)

# convert the other way around

xx = {
    'name': 'john',
    'age':30,
    'city':'New York'
}

yy = json.dumps(xx)

print(yy)

# you could also convert other types as well
print(json.dumps(31.44))

# Python | Json
# dict -> Object
# list -> Array
# tuple -> Array
# str -> String
# int -> Number
# float -> Number
# True -> true
# False ->  false
# None -> null