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
raiseValueError("Can only serialise str, int, float, and list.")
returndump_json(value)
We validate the types here to make sure we can serialise it.
The list of types is fairly limited - it excludes Decimal, date, and datetime, because Python's json.dumps is pretty restrictive. We might be able to extend json.dumps to handle these additional types.
Note - if orjson is installed, this is less of a problem, as it serialises far more types.
The text was updated successfully, but these errors were encountered:
The way we store arrays in SQLite is by converting the values to JSON strings, and then storing them in a text field.
We have this function which converts list values into JSON:
piccolo/piccolo/engine/sqlite.py
Lines 84 to 91 in 0e2ec8a
We validate the types here to make sure we can serialise it.
The list of types is fairly limited - it excludes
Decimal
,date
, anddatetime
, because Python'sjson.dumps
is pretty restrictive. We might be able to extendjson.dumps
to handle these additional types.Note - if
orjson
is installed, this is less of a problem, as it serialises far more types.The text was updated successfully, but these errors were encountered: