json_unmarshaler

package
v0.0.0-...-2e419a0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Unmarshaler

type Unmarshaler struct {
	Validate *validator.Validate
	// contains filtered or unexported fields
}

func New

func New() *Unmarshaler

func (*Unmarshaler) Unmarshal

func (p *Unmarshaler) Unmarshal(data []byte, dest interface{}) error

Unmarshal will unmarshal and validate the passed json data. If validation fails, dest will still have been modified!

func (*Unmarshaler) UnmarshalReader

func (p *Unmarshaler) UnmarshalReader(r io.ReadCloser, dest interface{}) error

UnmarshalReader will unmarshal and validate the passed json data. If validation fails, dest will still have been modified!

type ValidationError

type ValidationError struct {
	TranslatedErrors map[string]string
	// contains filtered or unexported fields
}

func (ValidationError) Error

func (err ValidationError) Error() string

Jump to

Keyboard shortcuts

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