Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultOptionsV1 = Struct{ Flags: jsonflags.Flags{ Presence: uint64(jsonflags.AllFlags & ^jsonflags.WhitespaceFlags), Values: uint64(jsonflags.DefaultV1Flags), }, }
DefaultOptionsV1 is the set of all options that define default v1 behavior.
var DefaultOptionsV2 = Struct{ Flags: jsonflags.Flags{ Presence: uint64(jsonflags.AllFlags & ^jsonflags.WhitespaceFlags), Values: uint64(0), }, }
DefaultOptionsV2 is the set of all options that define default v2 behavior.
GetUnknownOption is injected by the "json" package to handle Options declared in that package so that "jsonopts" can handle them.
var JoinUnknownOption = func(*Struct, Options) { panic("unknown option") }
JoinUnknownOption is injected by the "json" package to handle Options declared in that package so that "jsonopts" can handle them.
Functions ¶
Types ¶
type ArshalValues ¶
type ByteLimit ¶
type ByteLimit int64 // jsontext.WithByteLimit
func (ByteLimit) JSONOptions ¶
func (ByteLimit) JSONOptions(internal.NotForPublicUse)
type CoderValues ¶
type DepthLimit ¶
type DepthLimit int // jsontext.WithDepthLimit
func (DepthLimit) JSONOptions ¶
func (DepthLimit) JSONOptions(internal.NotForPublicUse)
type Indent ¶
type Indent string // jsontext.WithIndent
func (Indent) JSONOptions ¶
func (Indent) JSONOptions(internal.NotForPublicUse)
type IndentPrefix ¶
type IndentPrefix string // jsontext.WithIndentPrefix
func (IndentPrefix) JSONOptions ¶
func (IndentPrefix) JSONOptions(internal.NotForPublicUse)
type Options ¶
type Options interface { // JSONOptions is exported so related json packages can implement Options. JSONOptions(internal.NotForPublicUse) }
Options is the common options type shared across json packages.
type Struct ¶
type Struct struct { Flags jsonflags.Flags CoderValues ArshalValues }
Struct is the combination of all options in struct form. This is efficient to pass down the call stack and to query.
func (*Struct) CopyCoderOptions ¶
CopyCoderOptions copies coder-specific options from src to dst. This is used by json.MarshalEncode and json.UnmarshalDecode since those functions ignore any coder-specific options and uses the options from the Encoder or Decoder that is passed in.
func (*Struct) JSONOptions ¶
func (*Struct) JSONOptions(internal.NotForPublicUse)