MCPcopy
hub / github.com/helm/helm / ParseJSON

Function ParseJSON

pkg/strvals/parser.go:112–116  ·  view source on GitHub ↗

ParseJSON parses a string with format key1=val1, key2=val2, ... where values are json strings (null, or scalars, or arrays, or objects). An empty val is treated as null. If a key exists in dest, the new value overwrites the dest version.

(s string, dest map[string]any)

Source from the content-addressed store, hash-verified

110//
111// If a key exists in dest, the new value overwrites the dest version.
112func ParseJSON(s string, dest map[string]any) error {
113 scanner := bytes.NewBufferString(s)
114 t := newJSONParser(scanner, dest)
115 return t.parse()
116}
117
118// ParseIntoFile parses a filevals line and merges the result into dest.
119//

Callers 2

MergeValuesMethod · 0.92
TestParseJSONFunction · 0.85

Calls 2

newJSONParserFunction · 0.85
parseMethod · 0.45

Tested by 1

TestParseJSONFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…