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
{{ message }}
Repository navigation
JSON request bodies serialize unknown types with str(), including datetime #1172
Every JSON body goes through json.dumps(..., default=str). There are three places: the generic path in HttpClientBase (_base.py#L326-L330), which push_items, Actor and task input and most other bodies use; the key-value store record encoder (encoding.py#L72-L79) used by set_record and Actor input; and the request queue batch encoder (request_queue.py#L82-L91).
Any value the json module cannot encode becomes its str():
A datetime is sent with a space instead of T, which is not ISO 8601 / RFC 3339 and which date parsers in Actors or downstream consumers may reject. A set, a dataclass or any custom object is stored as its repr in a dataset item or record. The call succeeds, and the bad value shows up only when someone reads the data.
The JS client calls JSON.stringify (base.ts#L781), so a Date goes out as ISO 8601 (2026-01-01T00:00:00.000Z) through its toJSON. setRecord rejects symbols, bigints, functions and non-finite numbers up front (key_value_store.ts#L58-L72), and when JSON.stringify fails (for example on a circular structure) it throws and tells the caller to pick another content type (key_value_store.ts#L566-L575).
Expected behavior
Use one shared default hook in all three places. It encodes datetime and date with isoformat() and raises TypeError for anything else, naming the type and suggesting to serialize the value first or, for set_record, to pass another content type. Keep allow_nan=False.
Activity