package
0.0.0-20240815175050-ebd3a8989ca1
Repository: https://github.com/go-json-experiment/json.git
Documentation: pkg.go.dev
# Functions
DefaultOptionsV1 is the full set of all options that define v1 semantics.
FormatByteArrayAsArray specifies that a [N]byte array is formatted by default as a JSON array of byte values in contrast to v2 default of using a JSON string with the base64 encoding of the value.
FormatTimeDurationAsNanosecond specifies that [time.Duration] is formatted by default as a JSON number representing the number of nanoseconds in contrast to the v2 default of using a JSON string with the duration formatted with [time.Duration.String].
MatchCaseSensitiveDelimiter specifies that underscores and dashes are not to be ignored when performing case-insensitive name matching which occurs under [jsonv2.MatchCaseInsensitiveNames] or the `nocase` tag option.
OmitEmptyWithLegacyDefinition specifies that the `omitempty` tag option follows a definition of empty where a field is omitted if the Go value is false, 0, a nil pointer, a nil interface value, or any empty array, slice, map, or string.
RejectFloatOverflow specifies that unmarshaling a JSON number that exceeds the maximum representation of a Go float32 or float64 results in an error, rather than succeeding with the floating-point values set to either [math.MaxFloat32] or [math.MaxFloat64].
UnmarshalArrayFromAnyLength specifies that Go arrays can be unmarshaled from input JSON arrays of any length.
# Type aliases
Options are a set of options to configure the v2 "json" package to operate with v1 semantics for particular features.