You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In attempting to convert the return value of a sailpoint.beta.IdentitiesApi.list_identities() call to a list of json objects, the identity.to_json() call fails with the below error:
line 147, in main
test = [i.to_json() for i in identities]
^^^^^^^^^^^
File "/Users/imckenzie/code/corporate-identity-engineering/.venv/lib/python3.12/site-packages/sailpoint/beta/models/identity.py", line 84, in to_json
return json.dumps(self.to_dict())
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/init.py", line 231, in dumps
return _default_encoder.encode(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type datetime is not JSON serializable
I'm unsure if this is expected / not really a bug, but it seems like the to_json() parsing logic would generally be able to handle datetime objects.
The text was updated successfully, but these errors were encountered:
In attempting to convert the return value of a sailpoint.beta.IdentitiesApi.list_identities() call to a list of json objects, the identity.to_json() call fails with the below error:
I'm unsure if this is expected / not really a bug, but it seems like the to_json() parsing logic would generally be able to handle datetime objects.
The text was updated successfully, but these errors were encountered: