MCPcopy Index your code
hub / github.com/syncthing/syncthing / MarshalJSON

Method MarshalJSON

lib/api/api.go:1767–1771  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1765type jsonFileInfo protocol.FileInfo
1766
1767func (f jsonFileInfo) MarshalJSON() ([]byte, error) {
1768 m := fileIntfJSONMap(protocol.FileInfo(f))
1769 m["numBlocks"] = len(f.Blocks)
1770 return json.Marshal(m)
1771}
1772
1773func fileIntfJSONMap(f protocol.FileInfo) map[string]interface{} {
1774 out := map[string]interface{}{

Callers

nothing calls this directly

Calls 3

FileInfoStruct · 0.92
fileIntfJSONMapFunction · 0.85
MarshalMethod · 0.80

Tested by

no test coverage detected