strjson

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendEscaped

func AppendEscaped(dst []byte, s string, HTML bool) []byte

AppendEscaped appends the JSON escaped form of a string to a buffer.

func AppendUnescaped

func AppendUnescaped(dst []byte, s string) []byte

AppendUnescaped appends the unescaped form of a JSON string to a buffer. It's a convenience wrapper around Unescape([]byte, string) int

func Escaped

func Escaped(s string, HTML bool, quoted bool) string

Escaped returns the JSON escaped form of string. It allocates a new string so if possible use AppendEscaped for best performance.

func Unescape

func Unescape(dst []byte, s string) int

Unescape unescapes the JSON string into a buffer. The buffer must have sufficient size. A buffer with the same size as the input string is big enough for all cases.

func Unescaped

func Unescaped(s string) string

Unescaped returns the unescaped form of an escaped JSON string. If the input string requires unescaping it allocates a new string so if possible use Unescape([]byte, string) int for best performance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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