Documentation
¶
Index ¶
- func MarshalBasicTypesAsJSON(s *BasicTypes) ([]byte, error)
- func MarshalIssue24StructAsJSON(s *Issue24Struct) ([]byte, error)
- func MarshalMapTypesAsJSON(s *MapTypes) ([]byte, error)
- func MarshalNestedTypesAsJSON(s *NestedTypes) ([]byte, error)
- func MarshalOmitemptyPointerStructAsJSON(s *OmitemptyPointerStruct) ([]byte, error)
- func MarshalOmitemptyStructAsJSON(s *OmitemptyStruct) ([]byte, error)
- func MarshalPointerTypesAsJSON(s *PointerTypes) ([]byte, error)
- func MarshalSliceTypesAsJSON(s *SliceTypes) ([]byte, error)
- func MarshalStringArrayAsJSON(st []string) ([]byte, error)
- func MarshalStringToStringMapAsJSON(mt map[string]string) ([]byte, error)
- type BasicTypes
- type Issue24Struct
- type MapTypes
- type NestedTypes
- type OmitemptyPointerStruct
- type OmitemptyStruct
- type PointerTypes
- type SliceTypes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalBasicTypesAsJSON ¶
func MarshalBasicTypesAsJSON(s *BasicTypes) ([]byte, error)
func MarshalIssue24StructAsJSON ¶ added in v0.0.3
func MarshalIssue24StructAsJSON(s *Issue24Struct) ([]byte, error)
func MarshalMapTypesAsJSON ¶
func MarshalNestedTypesAsJSON ¶
func MarshalNestedTypesAsJSON(s *NestedTypes) ([]byte, error)
func MarshalOmitemptyPointerStructAsJSON ¶
func MarshalOmitemptyPointerStructAsJSON(s *OmitemptyPointerStruct) ([]byte, error)
func MarshalOmitemptyStructAsJSON ¶
func MarshalOmitemptyStructAsJSON(s *OmitemptyStruct) ([]byte, error)
func MarshalPointerTypesAsJSON ¶
func MarshalPointerTypesAsJSON(s *PointerTypes) ([]byte, error)
func MarshalSliceTypesAsJSON ¶
func MarshalSliceTypesAsJSON(s *SliceTypes) ([]byte, error)
func MarshalStringArrayAsJSON ¶ added in v0.0.2
Types ¶
type BasicTypes ¶
type BasicTypes struct { BoolValue bool `json:"bool_value"` IntValue int `json:"int_value"` Int8Value int8 `json:"int8_value"` Int16Value int16 `json:"int16_value"` Int32Value int32 `json:"int32_value"` Int64Value int64 `json:"int64_value"` UintValue uint `json:"uint_value"` Uint8Value uint8 `json:"uint8_value"` Uint16Value uint16 `json:"uint16_value"` Uint32Value uint32 `json:"uint32_value"` Uint64Value uint64 `json:"uint64_value"` Float32Value float32 `json:"float32_value"` Float64Value float64 `json:"float64_value"` StringValue string `json:"string_value"` }
type Issue24Struct ¶ added in v0.0.3
type MapTypes ¶
type MapTypes struct { Map map[string]string `json:"map"` MapSlice []map[string]string `json:"map_slice"` NestedMap map[string]map[string]string `json:"nested_map"` IntKeyMap map[int]string `json:"int_key_map"` SliceValueMap map[string][]string `json:"slice_value_map"` PointerValueMap map[string]*string `json:"pointer_value_map"` NullMap map[string]string `json:"null_map"` }
type NestedTypes ¶
type NestedTypes struct { Field1 OmitemptyStruct `json:"field1"` Field2 *OmitemptyStruct `json:"field2"` OmittableField *OmitemptyStruct `json:"omittable_field,omitempty"` }
type OmitemptyPointerStruct ¶
type OmitemptyPointerStruct struct { EmptyBool *bool `json:"empty_bool,omitempty"` EmptyInt *int `json:"empty_int,omitempty"` EmptyUint *uint `json:"empty_uint,omitempty"` EmptyFloat *float32 `json:"empty_float,omitempty"` EmptyString *string `json:"empty_string,omitempty"` EmptySlice []string `json:"empty_slice,omitempty"` EmptyMap map[string]string `json:"empty_map,omitempty"` NotEmptyString *string `json:"not_empty_string"` }
type OmitemptyStruct ¶
type OmitemptyStruct struct { EmptyBool bool `json:"empty_bool,omitempty"` EmptyInt int `json:"empty_int,omitempty"` EmptyUint uint `json:"empty_uint,omitempty"` EmptyFloat float32 `json:"empty_float,omitempty"` EmptyString string `json:"empty_string,omitempty"` NotEmptyString string `json:"not_empty_string"` }
func (*OmitemptyStruct) MarshalJSON ¶
func (o *OmitemptyStruct) MarshalJSON() ([]byte, error)
type PointerTypes ¶
type PointerTypes struct { BoolValue *bool `json:"bool_value"` IntValue *int `json:"int_value"` Int8Value *int8 `json:"int8_value"` Int16Value *int16 `json:"int16_value"` Int32Value *int32 `json:"int32_value"` Int64Value *int64 `json:"int64_value"` UintValue *uint `json:"uint_value"` Uint8Value *uint8 `json:"uint8_value"` Uint16Value *uint16 `json:"uint16_value"` Uint32Value *uint32 `json:"uint32_value"` Uint64Value *uint64 `json:"uint64_value"` Float32Value *float32 `json:"float32_value"` Float64Value *float64 `json:"float64_value"` StringValue *string `json:"string_value"` }
Source Files
¶
- basic_types.go
- basic_types_gen.go
- issue_24_struct.go
- issue_24_struct_gen.go
- map_types.go
- map_types_gen.go
- nested_types.go
- nested_types_gen.go
- omitempty_pointer_struct_gen.go
- omitempty_struct.go
- omitempty_struct_gen.go
- pointer_types.go
- pointer_types_gen.go
- slice_types.go
- slice_types_gen.go
- string_array_gen.go
- string_to_string_map_gen.go
- toplevel_map.go
- toplevel_slice.go
Click to show internal directories.
Click to hide internal directories.