Documentation ¶
Index ¶
Constants ¶
View Source
const ( SerializerField = iota SerializerMethod )
Variables ¶
This section is empty.
Functions ¶
func DeserializeFromJSON ¶
func DeserializeFromJSON(buf []byte, v interface{})
func IsValidContainer ¶
func IsValidContainer(v interface{}) error
Types ¶
type Serializer ¶
type Serializer struct {
// contains filtered or unexported fields
}
func ConstructSerializer ¶
func ConstructSerializer(validator ValidatorPredicate) Serializer
Stub function - other logic at some point
func (Serializer) AddField ¶
func (s Serializer) AddField(name string) Serializer
func (Serializer) AddFieldAsString ¶
func (s Serializer) AddFieldAsString(name string) Serializer
func (Serializer) AddMethod ¶
func (s Serializer) AddMethod(name string, jsonKey string) Serializer
func (Serializer) SerializeToJSON ¶
func (s Serializer) SerializeToJSON(v interface{}) ([]byte, error)
type ValidatorPredicate ¶
type ValidatorPredicate func(interface{}) error
Click to show internal directories.
Click to hide internal directories.