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
This is a request for an enhancement to support JSON serialization for the different types supported
Eg:
importjsonfrompocketbaseimportPocketBaseclient=PocketBase('http://127.0.0.1:8090')
# authenticate as regular useruser_data=client.collection("users").auth_with_password("[email protected]", "thisIsAFaksePassword123")
# get a compliance reportreport=client.collection("compliance").get_list()
print(json.dumps(report, indent=4))
This currently results in:
Traceback (most recent call last):
File "/Users/dansikes/go/src/github.com/dsikes/equip/scripts/test.py", line 12, in <module>
print(json.dumps(report, indent=4))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/__init__.py", line 238, in dumps
**kw).encode(obj)
^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/encoder.py", line 202, in encode
chunks = list(chunks)
^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/encoder.py", line 439, in _iterencode
o = _default(o)
^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ListResult is not JSON serializable
Happy to work on a PR, but wanted to see if this was something you'd consider before doing so.
Thanks!
The text was updated successfully, but these errors were encountered:
Great work on this SDK.
This is a request for an enhancement to support JSON serialization for the different types supported
Eg:
This currently results in:
Happy to work on a PR, but wanted to see if this was something you'd consider before doing so.
Thanks!
The text was updated successfully, but these errors were encountered: