json

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

// TODO

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Marshal       = json.Marshal
	Unmarshal     = json.Unmarshal
	MarshalIndent = json.MarshalIndent
	Indent        = json.Indent
	NewDecoder    = json.NewDecoder
	NewEncoder    = json.NewEncoder
)
View Source
var (
	EmptyStringBytes = []byte(`""`)
	NullBytes        = []byte("null")
)

Functions

func NewPtr

func NewPtr[T any](t T) *T

Types

type Marshaler

type Marshaler = json.Marshaler

type Nullable

type Nullable[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](t T) Nullable[T]

func NewOptional

func NewOptional[T any](t T) *Nullable[T]

func Null

func Null[T any]() Nullable[T]

func OptionalNull

func OptionalNull[T any]() *Nullable[T]

func (Nullable[T]) IsNull

func (n Nullable[T]) IsNull() bool

func (Nullable[T]) MarshalJSON

func (n Nullable[T]) MarshalJSON() ([]byte, error)

func (*Nullable[T]) UnmarshalJSON

func (n *Nullable[T]) UnmarshalJSON(data []byte) error

func (Nullable[T]) Value

func (n Nullable[T]) Value() T

type RawMessage

type RawMessage = json.RawMessage

type Unmarshaler

type Unmarshaler = json.Unmarshaler

Jump to

Keyboard shortcuts

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