package jsonlazy

Import Path
	go.pact.im/x/jsonlazy (on go.dev)

Dependency Relation
	imports 2 packages, and imported by 0 packages

Involved Source Files Package jsonlazy implements delayed JSON encoding for values that do not implement json.Marshaler interface.
Package-Level Type Names (total 2, both are exported)
/* sort exporteds by: | */
Marshaler implements a delayed JSON encoding for values. MarshalJSON implemnets the json.Marshaler interface. Once is a shorthand for jsonlazy.Once(m). *Marshaler : encoding/json.Marshaler func NewMarshaler(v interface{}) *Marshaler
OnceMarshaler is a json.Marshaler that caches the result of MarshalJSON call. MarshalJSON implements the json.Marshaler interface. *OnceMarshaler : encoding/json.Marshaler func Once(m json.Marshaler) *OnceMarshaler func (*Marshaler).Once() *OnceMarshaler
Package-Level Functions (total 2, both are exported)
NewMarshaler returns a new Marshaler for the given value.
Once returns a new marshaler that caches the result of MarshalJSON call. That is, it calls MarshalJSON at most once.