MCPcopy
hub / github.com/tinylib/msgp / CopyToJSON

Function CopyToJSON

msgp/json.go:53–58  ·  view source on GitHub ↗

CopyToJSON reads MessagePack from 'src' and copies it as JSON to 'dst' until EOF.

(dst io.Writer, src io.Reader)

Source from the content-addressed store, hash-verified

51// CopyToJSON reads MessagePack from 'src' and copies it
52// as JSON to 'dst' until EOF.
53func CopyToJSON(dst io.Writer, src io.Reader) (n int64, err error) {
54 r := NewReader(src)
55 n, err = r.WriteToJSON(dst)
56 freeR(r)
57 return
58}
59
60// WriteToJSON translates MessagePack from 'r' and writes it as
61// JSON to 'w' until the underlying reader returns io.EOF. It returns

Callers 6

mustEncodeToJSONFunction · 0.92
TestReadIntfRecursionFunction · 0.85
TestCopyJSONFunction · 0.85
TestCopyJSONNegativeUTF8Function · 0.85
BenchmarkCopyToJSONFunction · 0.85

Calls 3

WriteToJSONMethod · 0.95
NewReaderFunction · 0.85
freeRFunction · 0.85

Tested by 6

mustEncodeToJSONFunction · 0.74
TestReadIntfRecursionFunction · 0.68
TestCopyJSONFunction · 0.68
TestCopyJSONNegativeUTF8Function · 0.68
BenchmarkCopyToJSONFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…