Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool bool
Bool can be used to decode any JSON value to bool. Empty strings as well as "false" and "0" evaluate to false, all other strings are true. Numbers equal to 0 will evaluate to false, all other numbers are true.
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON method for Bool
type Float ¶
type Float float64
Float can be used to decode any JSON value to int64. Strings that are not valid representation of a number will error. Boolean values will error
func (Float) MarshalJSON ¶
MarshalJSON method for Float
func (*Float) UnmarshalJSON ¶
UnmarshalJSON method for Float
type Int ¶
type Int int64
Int can be used to decode any JSON value to int64. Strings that are not valid representation of a number will error. Boolean values will error
func (*Int) UnmarshalJSON ¶
UnmarshalJSON method for Int
type NullBool ¶
NullBool can be used to decode any JSON value to bool. Empty strings as well as "false" and "0" evaluate to false, all other strings are true. Numbers equal to 0 will evaluate to false, all other numbers are true.
func (NullBool) MarshalJSON ¶
MarshalJSON method for Bool
func (*NullBool) UnmarshalJSON ¶
UnmarshalJSON method for Bool
type NullFloat ¶
NullFloat can be used to decode any JSON value to int64. Strings that are not valid representation of a number will error. Boolean values will error
func (NullFloat) MarshalJSON ¶
MarshalJSON method for Float
func (*NullFloat) UnmarshalJSON ¶
UnmarshalJSON method for Float
type NullInt ¶
NullInt can be used to decode any JSON value to int64. Strings that are not valid representation of a number will error. Boolean values will error
func (NullInt) MarshalJSON ¶
MarshalJSON method for Int
func (*NullInt) UnmarshalJSON ¶
UnmarshalJSON method for Int
type NullString ¶
NullString can be used to decode any JSON value to string
func (NullString) MarshalJSON ¶
func (fs NullString) MarshalJSON() ([]byte, error)
MarshalJSON method with value receiver for String Method must not have a pointer receiver! See https://stackoverflow.com/a/21394657/639133
func (*NullString) UnmarshalJSON ¶
func (fs *NullString) UnmarshalJSON(bArr []byte) (err error)
UnmarshalJSON for String
type String ¶
type String string
String can be used to decode any JSON value to string
func (String) MarshalJSON ¶
MarshalJSON method with value receiver for String Method must not have a pointer receiver! See https://stackoverflow.com/a/21394657/639133
func (*String) UnmarshalJSON ¶
UnmarshalJSON for String