Skip to main content

Module decode

Module decode 

Source
Expand description

JSON decoding APIs and their diagnostics.

Structs§

JcsDecoder
Decodes strict JSON text into an owned value using finite binary64 numbers. Construction uses the shared builder and the configured, root-inclusive max_depth; there is no additional fixed container limit. The legacy methods return a bare serde_json::Value; callers accepting deep documents should use the decode_value_* methods to retain iterative cleanup. The decoder borrows its accounting session for 'budget; R selects the resource kind and Q is the quantity representation used by that session. Calls reuse the same cumulative session, so limits apply across all inputs decoded through this value.
JsonDecodeError
Failure produced by either strict or normalizing JSON decoding.
JsonDecoder
Strictly decodes complete JSON documents while retaining cumulative usage.
JsonNumberToken
A syntactically validated number token borrowed from the input document.
JsonSyntaxError
A JSON syntax error with a zero-based byte offset and one-based source coordinates. Its column counts UTF-8 characters; CRLF is one line break, while LF and standalone CR each also start a new line.
JsonValidatedDecodeOptions
Generic structural and source-token limits for validated decoding.
JsonValidatedDecodeOptionsBuilder
Builds JsonValidatedDecodeOptions.
NormalizedJsonDocument
A normalized JSON document whose text outlives borrowed decode results.
NormalizingJsonDecodePolicy
Text-normalization and diagnostic policy for crate::decode::NormalizingJsonDecoder.
NormalizingJsonDecodePolicyBuilder
Builder for NormalizingJsonDecodePolicy.
NormalizingJsonDecoder
Normalizes non-fully-trusted text before decoding complete JSON documents.

Enums§

DiagnosticPolicy
Controls whether library-generated JSON decoding diagnostics retain input-derived details.
JcsDecodeError
JCS decoding failure with explicit duplicate-key handling.
JsonDecodeContext
Grammar location where a validated decode failure occurred.
JsonDecodeErrorKind
Represents the coarse category of a JSON decoding failure.
JsonDecodeErrorSource
An owned semantic source extracted from a JSON decoding failure.
JsonDecodeNumberModel
Controls lexical admission of syntactically valid JSON number tokens.
JsonDecodeStage
Identifies the semantic decoding stage where a failure occurred.
JsonMaterializationErrorReason
Describes why an admitted unique-key document could not be materialized.
JsonNumberPolicy
Selects how a validated source number is represented in the output tree.
JsonNumberTokenError
Explains why a validated JSON number cannot be represented as a safe integer.
JsonPathSegment
Identifies an object key or array index in a JSON value path.
JsonRootKind
Represents the top-level kind of a parsed JSON value.
JsonSyntaxErrorReason
The concrete reason why a JSON document was rejected lexically.
JsonValidatedAdmissionPolicy
Selects how validated decoding admits JSON tokens before checking what follows them.
JsonValidatedDecodeError
A validated decoding failure with source offset and privacy-safe outer formatting.
JsonValidatedLimit
Identifies an additional per-document decode limit for validated JSON.
MarkdownFenceClosing
Specifies whether an opening Markdown code fence needs a closing fence.
MarkdownFencePolicy
Controls whether and how one outer Markdown code fence is stripped.