from flask import jsonify, json
try:
# Initialize a employee list
employeeList = []
# create a instances for filling up employee list
for i in range(0, 2):
empDict = {
'firstName': 'Roy',
'lastName': 'Augustine'
}
employeeList.append('adsf')
# convert to json data
jsonStr = json.dumps(employeeList)
jsonObj = json.loads(jsonStr)
print(jsonObj)
# print(jsonify(Employees=jsonStr))
except Exception as e:
print(str(e))
No comments:
Post a Comment