Skip to content

StringOrBool🔗

Definition🔗

type StringOrBool struct {
    String *string `json:"String,omitempty"`
    Bool *bool `json:"Bool,omitempty"`
}

Methods🔗

MarshalJSON🔗

MarshalJSON implements a custom JSON marshalling logic to encode StringOrBool as JSON.

func (stringOrBool *StringOrBool) MarshalJSON() ([]byte, error)

UnmarshalJSON🔗

UnmarshalJSON implements a custom JSON unmarshalling logic to decode StringOrBool from JSON.

func (stringOrBool *StringOrBool) UnmarshalJSON(raw []byte) error

UnmarshalJSONStrict🔗

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode StringOrBool from JSON.

Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (stringOrBool *StringOrBool) UnmarshalJSONStrict(raw []byte) error

Equals🔗

Equals tests the equality of two StringOrBool objects.

func (stringOrBool *StringOrBool) Equals(other StringOrBool) bool

Validate🔗

Validate checks all the validation constraints that may be defined on StringOrBool fields for violations and returns them.

func (stringOrBool *StringOrBool) Validate() error