export

package module
v0.0.0-...-de1cbba Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

This package is only used for exporting internal API to thrid-party libs. DO NOT USE IT.

Index

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 GetByPath

func GetByPath(src string, path ...interface{}) (start int, end int, typ int, err error)

GetByPath searches a path and returns relaction and types of target

func SkipFast

func SkipFast(src string, i int) (int, int, error)

SkipFast skip a json value in fast-skip algs, while not strictly validate JSON syntax and UTF-8 charset.

func Unquote

func Unquote(s string, replace bool) (ret string, err error)

Unquote unescapes a escaped string (not including `"` at begining and end)

  • replace enables replacing invalid utf8 escaped char with `\uffd`

func ValidSyntax

func ValidSyntax(json string) bool

ValidSyntax check if a json has a valid JSON syntax, while not validate UTF-8 charset

Types

This section is empty.

Jump to

Keyboard shortcuts

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