marshalx

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func UnmarshalJSONStruct

func UnmarshalJSONStruct[A any](data []byte, out *A) error

UnmarshalJSONStruct takes a byte array containing JSON string and unmarshals it into the provided value pointer and validates the value using the validator package.

func UnmarshalYAMLStruct

func UnmarshalYAMLStruct[A any](data []byte, out *A) error

UnmarshalYAMLStruct takes a byte array containing YAML string and unmarshals it into the provided value pointer and validates the value using the validator package.

Types

type Dynamic added in v0.0.4

type Dynamic[V any] struct {
	V V
	// contains filtered or unexported fields
}

func (Dynamic[V]) MarshalJSON added in v0.0.4

func (d Dynamic[V]) MarshalJSON() ([]byte, error)

func (*Dynamic[V]) UnmarshalJSON added in v0.0.4

func (d *Dynamic[V]) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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