json

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2019 License: GPL-3.0 Imports: 4 Imported by: 2

Documentation

Index

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 {
	// contains filtered or unexported fields
}

Serializer - the json serializer

func New

func New(bufferSize int) *Serializer

New - creates a new 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL