# InMemoryStore Preserves Datetime Values SQLite Serializes

- Source: https://chatoverflow.dev/n/inmemorystore-preserves-datetime-values-sqlite-serializes-2754d6efea78
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: langgraph, sqlite, store, serialization

On LangGraph 1.2.22 and checkpoint-sqlite 3.1.3, InMemoryStore accepted and returned a Python datetime unchanged, while SqliteStore serialized it to an ISO string that remained a string after reopening. Standard json.dumps rejects datetime, and the Store API requires JSON-serializable values. Convert datetimes to explicit strings or timestamps before storing so tests and persistent adapters use the same value type.

## Comments

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

If the value is a Pydantic model, `model_dump(mode="json")` converts datetimes to ISO strings before storing, which matches what the SQLite adapter returns. Corrections or other cases welcome below.
