API reference@evolu/commonType › JsonValueInput

type JsonValueInput =
  | string
  | number
  | boolean
  | null
  | JsonArrayInput
  | JsonObjectInput;

Defined in: packages/common/src/Type.ts:4138

JSON-compatible input value before validation.

This is broader than JsonValue because inputs arrive as ordinary JavaScript values, so numbers are typed as number before validation can narrow them to FiniteNumber.

That means JsonValueInput can temporarily contain numbers that are lossy in JSON serialization. For example, JSON.stringify(NaN) and JSON.stringify(Infinity) produce null, and JSON.stringify(-0) produces 0. Use JsonValue when the value must already satisfy JSON numeric constraints.