encoding

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSON = "json"
	YAML = "yaml"

	YamlExtension = ".yaml"
	YmlExtension  = ".yml"
	JSONExtension = ".json"
)

Variables

View Source
var ErrMarshal = errors.New("error while marshalling data")

Functions

func MarshalData

func MarshalData(input interface{}, encoding string, options MarshalOptions) ([]byte, error)

func UnmarshalData

func UnmarshalData(data []byte, out interface{}) error

Types

type MarshalOptions

type MarshalOptions struct {
	Indent bool
}

type UnsupportedEncodingError

type UnsupportedEncodingError struct {
	Encoding string
}

func (UnsupportedEncodingError) Error

func (e UnsupportedEncodingError) Error() string

Jump to

Keyboard shortcuts

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