Documentation
¶
Index ¶
- type ArrayItem
- type Serializer
- func (j *Serializer) Add(name string, item interface{}, variablePath ...string) error
- func (j *Serializer) Serialize(name string, parameters ...interface{}) (string, error)
- func (j *Serializer) SerializeArray(items ...ArrayItem) (string, error)
- func (j *Serializer) SerializeGeneric(item interface{}) (string, error)
- func (j *Serializer) SerializeGenericArray(items ...interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayItem ¶ added in v1.2.0
type ArrayItem struct {
Name string
Parameters []interface{}
}
ArrayItem - a configuration to render a json
type Serializer ¶
type Serializer struct {
serializer.Serializer
// contains filtered or unexported fields
}
Serializer - the json serializer
func (*Serializer) Add ¶
func (j *Serializer) Add(name string, item interface{}, variablePath ...string) error
Add - adds a new JSON mapping
func (*Serializer) Serialize ¶
func (j *Serializer) Serialize(name string, parameters ...interface{}) (string, error)
Serialize - serializes a mapped JSON
func (*Serializer) SerializeArray ¶
func (j *Serializer) SerializeArray(items ...ArrayItem) (string, error)
SerializeArray - serializes an array of jsons
func (*Serializer) SerializeGeneric ¶ added in v1.2.1
func (j *Serializer) SerializeGeneric(item interface{}) (string, error)
SerializeGeneric - serializes with the correct cast based on the struct ArrayItem
func (*Serializer) SerializeGenericArray ¶ added in v1.2.1
func (j *Serializer) SerializeGenericArray(items ...interface{}) (string, error)
SerializeGenericArray - serializes with the correct cast based on the struct ArrayItem
Click to show internal directories.
Click to hide internal directories.