def _convert_json_to_entity(entry_element, property_resolver, encrypted_properties):
entity = Entity()<EOL>properties = {}<EOL>edmtypes = {}<EOL>odata = {}<EOL>for name, value in entry_element.items():<EOL><INDENT>if name.startswith('<STR_LIT>'):<EOL><INDENT>odata[name[<NUM_LIT:6>:]] = value<EOL><DEDENT>elif name.endswith('<STR_LIT>'):<EOL><INDENT>edmtypes[name[:-<NUM_LIT:11>]] = value<EOL><DEDENT>else:<EOL><INDENT>properties[name] = value<EOL><DEDENT><DEDENT>partition_key = properties.pop('<STR_LIT>', None)<EOL>if partition_key:<EOL><INDENT>entity['<STR_LIT>'] = partition_key<EOL><DEDENT>row_key = properties.pop('<STR_LIT>', None)<EOL>if row_key:<EOL><INDENT>entity['<STR_LIT>'] = row_key<EOL><DEDENT>timestamp = properties.pop('<STR_LIT>', None)<EOL>if timestamp:<EOL><INDENT>entity['<STR_LIT>'] = _from_entity_datetime(timestamp)<EOL><DEDENT>for name, value in properties.items():<EOL><INDENT>mtype = edmtypes.get(name);<EOL>if property_resolver:<EOL><INDENT>if not (name == '<STR_LIT>' orname == '<STR_LIT>'):<EOL><INDENT>mtype = property_resolver(partition_key, row_key, <EOL>name, value, mtype)<EOL>if mtype and mtype not in _EDM_TYPES:<EOL><INDENT>raise AzureException(_ERROR_TYPE_NOT_SUPPORTED.format(mtype))<EOL><DEDENT><DEDENT><DEDENT>if encrypted_properties is not None and name in encrypted_properties:<EOL><INDENT>mtype = EdmType.BINARY<EOL><DEDENT>if type(value) is int:<EOL><INDENT>mtype = EdmType.INT32<EOL><DEDENT>if not mtype: <EOL><INDENT>entity[name] = value<EOL><DEDENT>else:  <EOL><INDENT>conv = _ENTITY_TO_PYTHON_CONVERSIONS.get(mtype)<EOL>if conv is not None:<EOL><INDENT>try:<EOL><INDENT>property = conv(value)<EOL><DEDENT>except Exception as e:<EOL><INDENT>if property_resolver:<EOL><INDENT>raise AzureException(<EOL>_ERROR_INVALID_PROPERTY_RESOLVER.format(name, value, mtype))<EOL><DEDENT>else:<EOL><INDENT>raise e<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>property = EntityProperty(mtype, value)<EOL><DEDENT>entity[name] = property<EOL><DEDENT><DEDENT>etag = odata.get('<STR_LIT>')<EOL>if timestamp:<EOL><INDENT>etag = '<STR_LIT>' + url_quote(timestamp) + '<STR_LIT>'<EOL><DEDENT>entity['<STR_LIT>'] = etag<EOL>return entity<EOL>
Convert json response to entity.

    The entity format is:
    {
       "Address":"Mountain View",
       "Age":23,
       "AmountDue":200.23,
       "CustomerCode@odata.type":"Edm.Guid",
       "CustomerCode":"c9da6455-213d-42c9-9a79-3e9149a57833",
       "CustomerSince@odata.type":"Edm.DateTime",
       "CustomerSince":"2008-07-10T00:00:00",
       "IsActive":true,
       "NumberOfOrders@odata.type":"Edm.Int64",
       "NumberOfOrders":"255",
       "PartitionKey":"mypartitionkey",
       "RowKey":"myrowkey"
    }