MCPcopy Create free account
hub / github.com/driangle/taskmd / WriteJSON

Function WriteJSON

apps/cli/internal/cli/format.go:14–18  ·  view source on GitHub ↗

WriteJSON encodes v as indented JSON to w.

(w io.Writer, v any)

Source from the content-addressed store, hash-verified

12
13// WriteJSON encodes v as indented JSON to w.
14func WriteJSON(w io.Writer, v any) error {
15 enc := json.NewEncoder(w)
16 enc.SetIndent("", " ")
17 return enc.Encode(v)
18}
19
20// WriteYAML encodes v as YAML to w.
21func WriteYAML(w io.Writer, v any) error {

Callers 15

TestWriteJSONFunction · 0.85
runNextAllProjectsFunction · 0.85
outputNextJSONFunction · 0.85
outputTagsJSONFunction · 0.85
outputStatusListEmptyFunction · 0.85
runStatusSingleFunction · 0.85
runFeedFunction · 0.85
runTracksFunction · 0.85
outputBoardJSONFunction · 0.85
runProjectsFunction · 0.85
printImportResultFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestWriteJSONFunction · 0.68
captureSearchOutputFunction · 0.68
TestTodosList_JSONOutputFunction · 0.68