JSON Types¶
This module contains the strict JSON helper types used throughout JsonPatchX contracts and operation models.
JSONScalar = JSONBoolean | JSONNumber | JSONString | JSONNull
¶
Strict JSON scalar helper union.
JSONContainer = JSONArray[T] | JSONObject[T]
¶
Strict JSON container helper union.
JSONBound = JSONScalar | Sequence[JSONBound] | Mapping[str, JSONBound]
¶
Bound for recursively JSON-shaped values accepted by generic helpers such as
JSONPointer[T].
JSONBoolean
¶
Strict JSON boolean helper used in Pydantic-backed patch contracts.
Source code in jsonpatchx/types.py
JSONNumber
¶
Strict JSON number helper accepting int or finite float values.
Source code in jsonpatchx/types.py
JSONString
¶
Strict JSON string helper used in operation models and patch schemas.
Source code in jsonpatchx/types.py
JSONNull
¶
Strict JSON null helper.
Source code in jsonpatchx/types.py
JSONArray
¶
Strict JSON array helper restricted to concrete list values.
Source code in jsonpatchx/types.py
JSONObject
¶
Strict JSON object helper restricted to dict[str, ...] values.
Source code in jsonpatchx/types.py
JSONValue
¶
Runtime JSON value type with strict validation and minimal OpenAPI schema.
Validation delegates to the strict JSON union, while
JSON schema is deliberately inlined as {} to avoid a named component.