# Constants
CompactMarshaler indicates that the output JSON from json.Marshaler is always compact and needs no validation.
CompatibleWithStd is used to be compatible with std encoder.
EnableFallback indicates if encoder use fallback.
Encode Infinity or Nan float into `null`, instead of returning an error.
EscapeHTML indicates encoder to escape all HTML characters after serializing into JSON (see https://pkg.go.dev/encoding/json#HTMLEscape).
NoEncoderNewline indicates that the encoder should not add a newline after every message.
NoNullSliceOrMap indicates all empty Array or Object are encoded as '[]' or '{}', instead of 'null'.
NoQuoteTextMarshaler indicates that the output text from encoding.TextMarshaler is always escaped string and needs no quoting.
NoValidateJSONMarshaler indicates that the encoder should not validate the output string after encoding the JSONMarshaler to JSON.
SortMapKeys indicates that the keys of a map needs to be sorted before serializing into JSON.
ValidateString indicates that encoder should validate the input string before encoding it into JSON.
# Variables
Encode returns the JSON encoding of val, encoded with opts.
EncodeInto is like Encode but uses a user-supplied buffer instead of allocating a new one.
EncodeIndented is like Encode but applies Indent to format the output.
HTMLEscape appends to dst the JSON-encoded src with <, >, &, U+2028 and U+2029 characters inside string literals changed to \u003c, \u003e, \u0026, \u2028, \u2029 so that the JSON will be safe to embed inside HTML <script> tags.
NewStreamEncoder adapts to encoding/json.NewDecoder API.
Pretouch compiles vt ahead-of-time to avoid JIT compilation on-the-fly, in order to reduce the first-hit latency.
Quote returns the JSON-quoted version of s.
Valid validates json and returns first non-blank character position, if it is only one valid json value.
# Type aliases
Encoder represents a specific set of encoder configurations.
Options is a set of encoding options.
StreamEncoder uses io.Writer as input.