jsonstring

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: BSD-3-Clause, GPL-2.0-or-later Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeStringFromBytes

func EncodeStringFromBytes(w fastio.AllWriter, escaper BackslashEscaper, utf InvalidUTF8Mode, val reflect.Value, str []byte) error

func EncodeStringFromString

func EncodeStringFromString(w fastio.AllWriter, escaper BackslashEscaper, utf InvalidUTF8Mode, val reflect.Value, str string) error

func WriteStringChar

func WriteStringChar(w fastio.AllWriter, c rune, escape BackslashEscapeMode) error

func WriteStringUnicodeEscape added in v0.3.7

func WriteStringUnicodeEscape(w io.Writer, c rune, mode BackslashEscapeMode) error

Types

type BackslashEscapeMode

type BackslashEscapeMode uint8

BackslashEscapeMode is describe in the main lowmemjson package docs.

const (
	BackslashEscapeNone BackslashEscapeMode = iota
	BackslashEscapeShort
	BackslashEscapeRawByte

	BackslashEscapeUnicodeXXXX
	BackslashEscapeUnicodeXXXx
	BackslashEscapeUnicodeXXxX
	BackslashEscapeUnicodeXXxx
	BackslashEscapeUnicodeXxXX
	BackslashEscapeUnicodeXxXx
	BackslashEscapeUnicodeXxxX
	BackslashEscapeUnicodeXxxx
	BackslashEscapeUnicodexXXX
	BackslashEscapeUnicodexXXx
	BackslashEscapeUnicodexXxX
	BackslashEscapeUnicodexXxx
	BackslashEscapeUnicodexxXX
	BackslashEscapeUnicodexxXx
	BackslashEscapeUnicodexxxX
	BackslashEscapeUnicodexxxx

	BackslashEscapeUnicodeMin = BackslashEscapeUnicodeXXXX
	BackslashEscapeUnicodeMax = BackslashEscapeUnicodexxxx

	BackslashEscapeUnicode = BackslashEscapeUnicodexxxx // back-compat
)

type BackslashEscaper

type BackslashEscaper = func(rune, BackslashEscapeMode) BackslashEscapeMode

BackslashEscaper is describe in the main lowmemjson package docs.

type InvalidUTF8Mode added in v0.3.7

type InvalidUTF8Mode uint8

InvalidUTF8Mode is describe in the main lowmemjson package docs.

const (
	InvalidUTF8Replace InvalidUTF8Mode = iota
	InvalidUTF8Preserve
	InvalidUTF8Error
)

Jump to

Keyboard shortcuts

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