json

package
v1.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArraySerialiser

type ArraySerialiser struct {
	// contains filtered or unexported fields
}

ArraySerialiser is a JSON serialiser which wraps serialised objects into an array. Under the hood it uses a combination of json.Encoder and a bytes.Buffer.

func NewArraySerialiser

func NewArraySerialiser(bufSize int) (*ArraySerialiser, error)

NewArraySerialiser returns a new ArraySerialiser with specified buffer size.

func (*ArraySerialiser) Finalise

func (a *ArraySerialiser) Finalise() ([]byte, error)

Finalise finalises the serialised data by closing the array and returning the resulting byte representation of the data.

func (*ArraySerialiser) Write

func (a *ArraySerialiser) Write(val interface{}) error

Jump to

Keyboard shortcuts

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