MCPcopy
hub / github.com/tidwall/sjson / appendStringify

Function appendStringify

sjson.go:124–133  ·  view source on GitHub ↗

appendStringify makes a json string and appends to buf.

(buf []byte, s string)

Source from the content-addressed store, hash-verified

122
123// appendStringify makes a json string and appends to buf.
124func appendStringify(buf []byte, s string) []byte {
125 if mustMarshalString(s) {
126 b, _ := jsongo.Marshal(s)
127 return append(buf, b...)
128 }
129 buf = append(buf, '"')
130 buf = append(buf, s...)
131 buf = append(buf, '"')
132 return buf
133}
134
135// appendBuild builds a json block from a json path.
136func appendBuild(buf []byte, array bool, paths []pathResult, raw string,

Callers 4

appendBuildFunction · 0.85
appendRawPathsFunction · 0.85
setFunction · 0.85
setComplexPathFunction · 0.85

Calls 1

mustMarshalStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…