jsoncodec

package
v0.51.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(input any, options ...jsonv2.Options) (data []byte, err error)

func MarshalEncode

func MarshalEncode(enc *jsontext.Encoder, input any) error

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 MarshalWrite

func MarshalWrite(output io.Writer, input any, options ...jsonv2.Options) error

func MethodError

func MethodError(err error) error

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.

func Unmarshal

func Unmarshal(data []byte, output any, options ...jsonv2.Options) error

func UnmarshalExact

func UnmarshalExact(data []byte, output any, options ...jsonv2.Options) error

UnmarshalExact retains json.Number at dynamic interface boundaries.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL