Documentation ¶
Overview ¶
Package null provides performant nullable values for JSON serialization/deserialization
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type String ¶
String is a nullable string value It's useful to handle string JSON values that could be `null` in the incoming log JSON. It's `omitempty` behavior when used with `jsoniter` is to omit both `""` and `null` in the output
func FromString ¶
FromString creates a non-null String. It is inlined by the compiler.
func (*String) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface WARNING: Since `json` package has no method of modifying `omitempty` behavior, the empty values (`null`, `""`) cannot be omitted when using `json.Marshal`. To omit a `null` or empty string we need to use `jsoniter.Marshal`.
func (*String) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface