easyjson

package
v0.0.0-...-608fcb9 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package easyjson provides utilities for use with easyjson.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericEJ

type GenericEJ[T any] struct {
	Data T
}

GenericEJ is a type that uses the stdlib json (un)marshaler to make any type compatible with easyjson by implementing the EasyJSON interfaces.

func New

func New[T any](data T) *GenericEJ[T]

New creates a new geneic EasyJSON container.

func (*GenericEJ[T]) MarshalEasyJSON

func (t *GenericEJ[T]) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON marshals any type to json with use of the stdlib json pkg.

func (*GenericEJ[T]) UnmarshalEasyJSON

func (t *GenericEJ[T]) UnmarshalEasyJSON(w *jlexer.Lexer)

UnmarshalEasyJSON unmarshals any type from json with use of the stdlib json pkg.

Jump to

Keyboard shortcuts

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