ndjson

package module
v0.0.0-...-1d92486 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 5 Imported by: 1

README

go-ndjson

test codecov MIT License

Go package for Newline delimited JSON (http://ndjson.org/)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v interface{}) ([]byte, error)

Marshal returns the Newline delimited JSON encoding of v.

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

Unmarshal parses the data that is encoded Newline delimited JSON format and stores the result in the value pointed to by v.

Types

type InvalidMarshalError

type InvalidMarshalError struct {
	Kind reflect.Kind
}

InvalidMarshalError describes an invalid argument passed to Marshal. (The argument to Marshal must be a slice.)

func (*InvalidMarshalError) Error

func (e *InvalidMarshalError) Error() string

type InvalidUnmarshalError

type InvalidUnmarshalError struct {
	Type reflect.Type
}

InvalidUnmarshalError describes an invalid argument passed to Unmarshal. (The argument to Unmarshal must be a non-nil pointer to a slice.)

func (*InvalidUnmarshalError) Error

func (e *InvalidUnmarshalError) Error() string

Jump to

Keyboard shortcuts

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