Documentation
¶
Overview ¶
Package jsoncodec contains application JSON methods before native JSON error inspection. Foreign codecs receive opaque failures; callers receive safe, inspectable causes after the codec has returned.
Index ¶
- func Marshal(input any, options ...jsonv2.Options) (data []byte, err error)
- func MarshalEncode(enc *jsontext.Encoder, input any) error
- func MarshalWrite(output io.Writer, input any, options ...jsonv2.Options) error
- func MethodError(err error) error
- func Unmarshal(data []byte, output any, options ...jsonv2.Options) error
- func UnmarshalExact(data []byte, output any, options ...jsonv2.Options) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalEncode ¶
MarshalEncode protects framework streaming delegation while retaining the encoder's options. Caller-installed WithMarshalers functions keep precedence: their implementation and native invocation belong to that caller; this boundary contains the JSON/text methods selected after those functions decline.
func MethodError ¶
MethodError returns a safe native JSON callback failure. Native JSON owns the outer operation, so this retains contained Is/As without an outer Reveal call.
Types ¶
This section is empty.