encoders

package
v5.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaller

type Marshaller interface {
	// Marshal marshals the given data structure to a certain format and returns the representation in bytes.
	Marshal(v interface{}) ([]byte, error)

	// Unmarshal parses a byte representation of a given data in a certain format and loads v with matching parsed values.
	Unmarshal(data []byte, v interface{}) error
}

Marshaller marshals and unmarshals data to/from specific formats.

var JSON Marshaller = &jsonEncoder{}

JSON holds a json encoder instance implementing Marshaller.

Jump to

Keyboard shortcuts

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