marshaler

package
v0.0.0-...-21754ba Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNeedPointer = errors.New("must unmarshal into pointer type or map")
View Source
var ErrStructOrMap = errors.New("can only decode into struct or map")

Functions

func Debug

func Debug(s string, v ...interface{})

func Marshal

func Marshal(v interface{}, doc *document.Document) error

func MarshalWithOptions

func MarshalWithOptions(v interface{}, doc *document.Document, opts MarshalOptions) error

func Unmarshal

func Unmarshal(doc *document.Document, v interface{}) error

func UnmarshalWithOptions

func UnmarshalWithOptions(doc *document.Document, v interface{}, opts UnmarshalOptions) error

Types

type MarshalOptions

type MarshalOptions struct {
}

type UnmarshalOptions

type UnmarshalOptions struct {
	AllowUnhandledNodes    bool
	AllowUnhandledArgs     bool
	AllowUnhandledProps    bool
	AllowUnhandledChildren bool
	RelaxedNonCompliant    relaxed.Flags
}

Jump to

Keyboard shortcuts

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