fast

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT, Apache-2.0 Imports: 6 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

View Source
var (
	FastPathEnable    = os.Getenv("GJSON_FAST_PATH") != ""
	FastStringEnable  = os.Getenv("GJSON_FAST_STRING") == "1" || os.Getenv("GJSON_FAST_STRING") == "2"
	ValidStringEnable = os.Getenv("GJSON_FAST_STRING") == "2"
)

Functions

func FastPaths

func FastPaths(path string) []interface{}

check if it is a simple path and return parsed values. Now only a path contains only alphabets, '_' and numbers can be regarded as simple TODO: support more delicated simpliable cases

func Get

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

Get search paths from p, and returns the start and end position of that value

func JSONType

func JSONType(sonic int) int

func Skip

func Skip(src string, i int) (end int, remian string)

func String

func String(json string, i int) (end int, str string, hasEsc bool, error error)

func Unquote

func Unquote(str string) (string, error)

func Valid

func Valid(json string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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