Returning JSON string instead of Python object