I have string of data basically which has a objects with in the objects..
{\"id\":\"XXXX\", \"name\": \"xyz\", \"user\" : { \"id\": \"XXXX\", \"username\":\"
I found two errors in your first example:
group in your stringified (Json) version of your dict. This should be a "group" (with quotes).JSON_Datalist ≠ JSON_DataList (lowercase vs. capital L).After fixing both, I had no problems anymore:
>>> JSON_Datalist = '{"id":"XXXX", "name": "xyz", "user" : { "id": "XXXX", "username":"XYZ", "group":{"id": "XXXX"}}}'
>>> the_dict = json.loads(JSON_Datalist)
>>> the_dict
{u'user': {u'username': u'XYZ', u'group': {u'id': u'XXXX'}, u'id': u'XXXX'}, u'id': u'XXXX', u'name': u'xyz'}