json payload python function

Solutions on MaxInterview for json payload python function by the best coders in the world

showing results for - "json payload python function"
Constanza
16 Feb 2019
1import json
2json_string = '{"name":"Rupert", "age": 25, "desig":"developer"}'
3print type (json_string)
4def func(strng):
5    a =json.loads(strng)
6    print type(a)
7    for k,v in a.iteritems():
8           print k,v
9    print dict(a)      
10func(json_string)