By adding data class support to the record model, you can simply use data class.asdict to have a JSON serializable object.
Here is a simple example:
import json
import dataclasses
from pocketbase import PocketBase
client = PocketBase('http://127.0.0.1:8090')
client.admins.auth_with_password('foo@bar.com', 'fakepassword123')
# get a list of things from a collection
report = client.collection("users").get_list()
j = dataclasses.asdict(report)
print(json.dumps(j, indent=4))
By adding data class support to the record model, you can simply use data class.asdict to have a JSON serializable object. Here is a simple example:
Which gives
This would close #27