MCPcopy Create free account
hub / github.com/alecthomas/devtodo2 / Serialize

Method Serialize

jsonio.go:43–51  ·  view source on GitHub ↗
(writer io.Writer, tasks TaskList)

Source from the content-addressed store, hash-verified

41}
42
43func (j *jsonIO) Serialize(writer io.Writer, tasks TaskList) (err error) {
44 translated := toMarshalableTaskList(tasks)
45 data, err := json.MarshalIndent(translated, "", " ")
46 if err != nil {
47 return err
48 }
49 _, err = writer.Write(data)
50 return
51}
52
53// Utility functions and structures for marshaling
54

Callers

nothing calls this directly

Calls 1

toMarshalableTaskListFunction · 0.85

Tested by

no test coverage detected