types

package
v0.0.0-...-d31700d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	bytes.Buffer // accumulated output
	Scratch      [64]byte
}

An Buffer encodes JSON into a bytes.Buffer.

type Options

type Options struct {
	// quoted causes primitive fields to be encoded inside JSON strings.
	Quoted bool
	// escapeHTML causes '<', '>', and '&' to be escaped in JSON strings.
	EscapeHTML bool
	// contains filtered or unexported fields
}

func (*Options) AppendConvertedTypeInUpperLayers

func (opts *Options) AppendConvertedTypeInUpperLayers(typ reflect.Type)

func (*Options) NotRecursion

func (opts *Options) NotRecursion(typ reflect.Type) bool

check recursion when convert empty slice/map/pointer to non empty ones

func (*Options) SetComment

func (opts *Options) SetComment(comment, commentHTML string)

set comment when encode struct field

func (*Options) WriteCommentIfPresent

func (opts *Options) WriteCommentIfPresent(buf *Buffer)

Jump to

Keyboard shortcuts

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