Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
type Opt[T any] struct { // contains filtered or unexported fields }
func (*Opt[T]) UnmarshalJSON ¶
type Strings ¶
type Strings []string
Strings decodes JSON stirng or array of strings or `null` into Go slice of string:
- If JSON value is an array of string, it's decoded directly into Go slice: ["one", "two", "three"] -> ["one", "tho", "three"]
- JSON string value decoded into singleton Go slice: "Helllo" -> ["Hello"]
- JSON `null` value decoded into an empty slice: null -> []
func (*Strings) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.