MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / ParseJSON

Function ParseJSON

pkg/util/json/json.go:1040–1046  ·  view source on GitHub ↗

ParseJSON takes a string of JSON and returns a JSON value.

(s string, opts ...ParseOption)

Source from the content-addressed store, hash-verified

1038
1039// ParseJSON takes a string of JSON and returns a JSON value.
1040func ParseJSON(s string, opts ...ParseOption) (JSON, error) {
1041 cfg := parseJSONDefaultConfig
1042 for _, o := range opts {
1043 o.apply(&cfg)
1044 }
1045 return cfg.parseJSON(s)
1046}
1047
1048func init() {
1049 encoding.PrettyPrintJSONValueEncoded = func(b []byte) (string, error) {

Callers 5

jsonStringMethod · 0.92
ParseDJSONFunction · 0.92
spatialObjectToJSONFunction · 0.92
FuzzParseJSONFunction · 0.85

Calls 2

parseJSONMethod · 0.80
applyMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…