alg
v1.15.5
github.com/bytedance/sonic/internal/encoder/alg
Documentation
pkg.go.dev ↗Constants
BitSortMapKeys (10 declarations)
const ( BitSortMapKeys = iota BitEscapeHTML BitCompactMarshaler BitNoQuoteTextMarshaler BitNoNullSliceOrMap BitValidateString BitNoValidateJSONMarshaler BitNoEncoderNewline BitEncodeNullForInfOrNan BitPointerValue = 63 )
Functions
F32toa
func F32toa(buf []byte, v float32) []byte
F64toa
func F64toa(buf []byte, v float64) []byte
HtmlEscape
func HtmlEscape(dst []byte, src []byte) []byte
I64toa
func I64toa(buf []byte, v int64) []byte
IsValidNumber
func IsValidNumber(s string) bool
IteratorNext
func IteratorNext(p *MapIterator)
IteratorStop
func IteratorStop(p *MapIterator)
Quote
func Quote(buf []byte, val string, double bool) []byte
U64toa
func U64toa(buf []byte, v uint64) []byte
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
MapIterator
type MapIterator struct {
It rt.GoMapIterator // must be the first field
// contains filtered or unexported fields
}
IteratorStart
func IteratorStart(t *rt.GoMapType, m unsafe.Pointer, fv uint64) (*MapIterator, error)