I have string of data basically which has a objects with in the objects..
{\"id\":\"XXXX\", \"name\": \"xyz\", \"user\" : { \"id\": \"XXXX\", \"username\":\"
after fix the problem group should be "group", below code can meet your requirement
json_data={"id":"XXXX", "name": "xyz", "user" : { "id": "XXXX", "username":"XYZ", "group":{"id": "XXXX"}}}
data = json.dumps(json_data)
json_to_python = json.loads(data)
print (json_to_python)
{'id': 'XXXX', 'name': 'xyz', 'user': {'id': 'XXXX', 'username': 'XYZ', 'group': {'id': 'XXXX'}}}