Rxova
Skip to content

jsonSerializer

const jsonSerializer: Serializer;

JSON, with silent losses turned into errors.

Every type below survives BroadcastChannel and does not survive JSON, so without this a value’s fate depends on which transport a browser happened to give you. Refusing is the same call store.set() already makes for a value structured clone rejects: better one actionable error naming the key than two replicas that quietly disagree.

BigInt and circular references need no check here — JSON.stringify throws on both already. Only the silent losses are worth code.