encoding

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(n ipld.Node, sink shared.TokenSink) error

Marshal provides a very general node-to-tokens marshalling feature. It can handle either cbor or json by being combined with a refmt TokenSink.

It is valid for all the data model types except links, which are only supported if the nodes are typed and provide additional information to clarify how links should be encoded through their type info. (The dag-cbor and dag-json formats can be used if links are of CID implementation and need to be encoded in a schemafree way.)

func Unmarshal

func Unmarshal(nb ipld.NodeBuilder, tokSrc shared.TokenSource) (ipld.Node, error)

Unmarshal provides a very general tokens-to-node unmarshalling feature. It can handle either cbor or json by being combined with a refmt TokenSink.

It is valid for all the data model types except links, which are only supported if the nodes are typed and provide additional information to clarify how links should be decoded through their type info. (The dag-cbor and dag-json formats can be used if links are of CID implementation and need to be decoded in a schemafree way.)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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