We return a json object from a python function as follows using given python dictionary.
import json
a = {'name':'Sarah', 'age': 24, 'isEmployed': True }
# a python dictionary
def retjson():
python2json = json.dumps(a)
print python2json
retjson()
OUTPUT
{"age": 24, "isEmployed": true, "name": "Sarah"}