jsonmap

package
v0.0.0-...-1e0f2b1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnexpectedToken = errors.New("unexpected token")

ErrUnexpectedToken is the error returned when an unexpected token is found while decoding (i.e. unmarshalling) an ordered map.

Functions

This section is empty.

Types

type Ordered

type Ordered struct {
	Order []string
	Data  map[string]interface{}
}

Ordered is a structure that keeps a JSON map preserving the order of the keys as they were in the original JSON object.

func (Ordered) MarshalJSON

func (o Ordered) MarshalJSON() ([]byte, error)

func (*Ordered) UnmarshalJSON

func (o *Ordered) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal a JSON object into an Ordered map.

Jump to

Keyboard shortcuts

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