marshal

package
v0.0.0-...-73cd16d Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: EPL-1.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("value can not be marshaled")

Functions

func Marshal

func Marshal(obj any) ([]byte, error)

func Unmarshal

func Unmarshal(env *core.Env, data []byte) (any, error)

Types

type BigFloat

type BigFloat struct {
	Value string `json:"value" cbor:"1,keyasint"`
}

type Char

type Char struct {
	Value string `json:"value" cbor:"1,keyasint"`
}

type Collection

type Collection struct {
	Type   string            `json:"type" cbor:"1,keyasint"`
	Values []cbor.RawMessage `json:"values" cbor:"2,keyasint"`
	Ref    int               `json:"ref" cbor:"3,keyasint"`
}

type ForeignRef

type ForeignRef struct {
	Ref string `json:"ref" cbor:"1,keyasint"`
}

type Keyword

type Keyword struct {
	Value string `json:"value" cbor:"1,keyasint"`
}

type Map

type Map struct {
	Values []cbor.RawMessage `json:"map" cbor:"1,keyasint"`
	Ref    int               `json:"ref" cbor:"2,keyasint"`
}

type Ratio

type Ratio struct {
	X *big.Int `json:"x" cbor:"1,keyasint"`
	Y *big.Int `json:"y" cbor:"2,keyasint"`
}

type Ref

type Ref struct {
	Index int `json:"ref" cbor:"1,keyasint"`
}

type Regex

type Regex struct {
	Value string `json:"value" cbor:"1,keyasint"`
}

type Symbol

type Symbol struct {
	Value string `json:"value" cbor:"1,keyasint"`
}

Jump to

Keyboard shortcuts

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