package options
Import Path
github.com/goccy/go-json/internal/options (on go.dev)
Dependency Relation
imports one package, and imported by 5 packages
Involved Source Files
Package options is the state of the options of jsontext and of the v2 json package: both packages take the same
Options, so that the options of one may be given to the functions of the other, as encoding/json/v2 and
encoding/json/jsontext allow. An Options can't be made outside this module: its method takes a type of this
internal package.
Package-Level Type Names (total 5)
Bool is the option of a property which is true or false: the index of the bit of its flag shifted by one bit, with
the value as the lowest bit. It is a byte, which an Options holds without an allocation, as the runtime has the
values of the bytes: an option made for each call, as encoding/json/v2's are, costs nothing more.
ApplyTo sets the property of o in c.
Bool : Options
Config is the state of the options: the properties which were set, and their values.
the properties which are not booleans, valid when their bits are in Set
// the *Marshalers of the v2 json package
Prefix string
// the properties which an option set
// the *Unmarshalers of the v2 json package
// the values of the properties which were set; the others are false
Apply sets the options in order: an option set later overrides a property set by an earlier one. A Bool, as most
options are, is applied without a call of its method.
ApplyTo sets the properties of c in dst: a Config is itself an option of the properties it sets.
Has reports whether the property f is true.
Same reports whether c sets the same options as d. The properties which are not booleans are compared only if
they are set; the marshalers and unmarshalers by identity.
*Config : Options
func Bool.ApplyTo(c *Config)
func (*Config).ApplyTo(dst *Config)
func (*Config).Same(d *Config) bool
func Indent.ApplyTo(c *Config)
func Options.ApplyTo(c *Config)
func github.com/goccy/go-json.Options.ApplyTo(c *Config)
func github.com/goccy/go-json/jsontext.Options.ApplyTo(c *Config)
Flags are properties which are true or false, and, for the properties whose values are not booleans, the bits
which show that they are set.
func BoolOf(f Flags, v bool) Options
func (*Config).Has(f Flags) bool
const AllowDuplicateNames
const AllowInvalidUTF8
const CallMethodsWithLegacySemantics
const CanonicalizeRawFloats
const CanonicalizeRawInts
const DefaultV1Flags
const Deterministic
const EscapeForHTML
const EscapeForJS
const FormatByteArrayAsArray
const FormatBytesWithLegacySemantics
const FormatDurationAsNano
const FormatNilMapAsNull
const FormatNilSliceAsNull
const IndentSet
const MarshalersSet
const MatchCaseInsensitiveNames
const MatchCaseSensitiveDelimiter
const MergeWithLegacySemantics
const Multiline
const OmitEmptyWithLegacySemantics
const OmitTopLevelNewline
const OmitZeroStructFields
const ParseBytesWithLooseRFC4648
const ParseTimeWithLooseRFC3339
const PrefixSet
const PreserveRawStrings
const RejectUnknownMembers
const ReorderRawObjects
const ReportErrorsWithLegacySemantics
const SpaceAfterColon
const SpaceAfterComma
const StringifyNumbers
const StringifyWithLegacySemantics
const StringTag
const UnmarshalAnyWithRawNumber
const UnmarshalArrayFromAnyLength
const UnmarshalersSet
const V1OptionFlags
Package-Level Functions (only one)
BoolOf returns the option which sets the property f, a single flag, to v.
Package-Level Constants (total 39)
The properties of the encoders and the decoders of jsontext.
The properties of the encoders and the decoders of jsontext.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of the encoders and the decoders of jsontext.
The properties of the encoders and the decoders of jsontext.
DefaultV1Flags are the properties which DefaultOptionsV1 of the root package sets to true, and DefaultOptionsV2 of
the v2 json package to false: the ones whose defaults differ between encoding/json and encoding/json/v2.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
The properties of the encoders and the decoders of jsontext.
The properties of the encoders and the decoders of jsontext.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
The properties of the encoders and the decoders of jsontext.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of the encoders and the decoders of jsontext.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
OmitTopLevelNewline is set by the functions and methods which format a single value, whose output has no
line feed after the value, as an Encoder writes.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of the encoders and the decoders of jsontext.
The properties of the encoders and the decoders of jsontext.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
The properties of the encoders and the decoders of jsontext.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of the encoders and the decoders of jsontext.
The properties of the encoders and the decoders of jsontext.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
StringTag is set by no option: the encoder which a method or a function of a value of a field of the `string`
option is given has it, by which MarshalEncode of the encoder encodes the value as such a value, as
encoding/json/v2 has it, until an object or an array begins.
UnmarshalAnyWithRawNumber is set by no option: the decoder which a Decoder of the root package gives
UnmarshalJSONFrom after UseNumber has it, by which UnmarshalDecode of the decoder decodes a number into an empty
interface as a json.Number, as encoding/json/v2 has it for encoding/json.
The properties of marshaling and unmarshaling Go values by the semantics of encoding/json ( v1 ), which the options
of the root package set, as the ones of encoding/json do: the v2 json package applies each of them, alone or with
the others.
The properties of marshaling and unmarshaling Go values, of the v2 json package.
V1OptionFlags are the properties of the semantics of encoding/json: the flags from ParseBytesWithLooseRFC4648 to
the last one, which the flag after it less the first one sets.
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |