sbvj01

package
v0.0.0-...-157ca18 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NullT byte = iota + 1
	NumberT
	BoolT
	VarintT
	StringT
	ArrayT
	ObjectT
)

Variables

View Source
var (
	Magic = []byte{'S', 'B', 'V', 'J', '0', '1'}
)

Functions

func Read

func Read(rd io.Reader) (interface{}, error)

func ReadArray

func ReadArray(rd io.Reader) ([]interface{}, error)

func ReadObject

func ReadObject(rd io.Reader) (map[String]interface{}, error)

func Write

func Write(wt io.Writer, anything interface{}) error

func WriteArray

func WriteArray(wt io.Writer, array []interface{}) error

func WriteHdr

func WriteHdr(wt io.Writer, r VerJsonHdr) error

func WriteObject

func WriteObject(wt io.Writer, object map[String]interface{}) error

Types

type VerJsonHdr

type VerJsonHdr struct {
	Id        String `json:"id"`
	Versioned bool   `json:"versioned"`
	Version   int32  `json:"version"`
}

func ReadHdr

func ReadHdr(rd io.Reader) (r VerJsonHdr, e error)

Jump to

Keyboard shortcuts

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