enjson

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotJSON = errors.New("Not json data")

Functions

func Marshal

func Marshal(obj interface{}, escapeHTML bool) (all []byte, err error)

func NewJSONEncode

func NewJSONEncode(obj interface{}, escapeHTML bool) encoder.Encoder

NewJSONEncode create a new json encoder

Types

type JSONEncode

type JSONEncode struct {
	// contains filtered or unexported fields
}

JSONEncode json encoder structure

func (*JSONEncode) Encode

func (j *JSONEncode) Encode(w io.Writer) (err error)

Encode json encoder

func (*JSONEncode) Name

func (j *JSONEncode) Name() string

Name json Encoder name

Jump to

Keyboard shortcuts

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