Documentation ¶
Overview ¶
This package is only used for exporting internal API to thrid-party libs. DO NOT USE IT.
Index ¶
- func DecodeString(src string, pos int, needEsc bool, validStr bool) (v string, ret int, hasEsc bool)
- func GetByPath(src string, path ...interface{}) (start int, end int, typ int, err error)
- func SkipFast(src string, i int) (int, int, error)
- func Unquote(s string, replace bool) (ret string, err error)
- func ValidSyntax(json string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeString ¶
func DecodeString(src string, pos int, needEsc bool, validStr bool) (v string, ret int, hasEsc bool)
DecoderString decodes a JSON string from pos and return golang string.
- needEsc indicates if to unescaped escaping chars
- hasEsc tells if the returned string has escaping chars
- validStr enables validating UTF8 charset
func SkipFast ¶
SkipFast skip a json value in fast-skip algs, while not strictly validate JSON syntax and UTF-8 charset.
func Unquote ¶
Unquote unescapes a escaped string (not including `"` at begining and end)
- replace enables replacing invalid utf8 escaped char with `\uffd`
func ValidSyntax ¶
ValidSyntax check if a json has a valid JSON syntax, while not validate UTF-8 charset
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.