how do i convert 'SimplePublicObjectWithAssociations'
SOLVE
ok i found my problem, i dont need to use json to convert this object into dict. so i can unpack it....
i simply need to use the response to get what i need... how easy is that, thats if you know....no conversions needed... no unpacking of nested dictionaries.... lists etc.
how do i convert 'SimplePublicObjectWithAssociations'
SOLVE
GOAL == get first and last name of objectid (contacts)
thx Lee, i condensed whats important in the code and pertaining to the issue. I need to get the simplePublicObject* type returned converted to Dict. to be able to unpack it
#below is what i tried amongst other things to try make json.load work. api_string = (str(api_response)) api_string = api_string.replace("'",'"') #double quotes needed for json #try to convert to dict error - i need to unpack my output to get first and last names
json_data = json.loads(api_string) print(json_data) -> raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value details = get_first_last_name_by_contact_id() print(details)
how do i convert 'SimplePublicObjectWithAssociations'
SOLVE
ok i found my problem, i dont need to use json to convert this object into dict. so i can unpack it....
i simply need to use the response to get what i need... how easy is that, thats if you know....no conversions needed... no unpacking of nested dictionaries.... lists etc.
how do i convert 'SimplePublicObjectWithAssociations'
SOLVE
and also a note, its for this specific case where i have access to the properties, in other case you do need to convert to dict --> (json) if this can help someone else i used below to convert to dict for another use case