alg

package
v1.12.6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BitSortMapKeys = iota
	BitEscapeHTML
	BitCompactMarshaler
	BitNoQuoteTextMarshaler
	BitNoNullSliceOrMap
	BitValidateString
	BitNoValidateJSONMarshaler
	BitNoEncoderNewline
	BitEncodeNullForInfOrNan

	BitPointerValue = 63
)

Variables

This section is empty.

Functions

func Compact

func Compact(p *[]byte, v []byte) error

func EncodeJsonMarshaler

func EncodeJsonMarshaler(buf *[]byte, val json.Marshaler, opt uint64) error

func EncodeNil

func EncodeNil(rb *[]byte) error

func EncodeTextMarshaler

func EncodeTextMarshaler(buf *[]byte, val encoding.TextMarshaler, opt uint64) error

func F32toa

func F32toa(buf []byte, v float32) []byte

func F64toa

func F64toa(buf []byte, v float64) []byte

func HtmlEscape

func HtmlEscape(dst []byte, src []byte) []byte

func I64toa

func I64toa(buf []byte, v int64) []byte

func IteratorNext

func IteratorNext(p *MapIterator)

func IteratorStop

func IteratorStop(p *MapIterator)

func Quote

func Quote(buf []byte, val string, double bool) []byte

func U64toa

func U64toa(buf []byte, v uint64) []byte

func Valid

func Valid(data []byte) (ok bool, start int)

Valid validates json and returns first non-blank character position, if it is only one valid json value. Otherwise returns invalid character position using start.

Note: it does not check for the invalid UTF-8 characters.

Types

type MapIterator

type MapIterator struct {
	It rt.GoMapIterator // must be the first field
	// contains filtered or unexported fields
}

func IteratorStart

func IteratorStart(t *rt.GoMapType, m *rt.GoMap, fv uint64) (*MapIterator, error)

Jump to

Keyboard shortcuts

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