Do the 'json.loads' in rest class