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

Method Deserialize

jsonio.go:34–41  ·  view source on GitHub ↗
(reader io.Reader)

Source from the content-addressed store, hash-verified

32}
33
34func (j *jsonIO) Deserialize(reader io.Reader) (tasks TaskList, err error) {
35 decoder := json.NewDecoder(reader)
36 mtl := &marshalableTaskList{}
37 if err = decoder.Decode(&mtl); err == nil {
38 tasks = fromMarshalableTaskList(mtl)
39 }
40 return
41}
42
43func (j *jsonIO) Serialize(writer io.Writer, tasks TaskList) (err error) {
44 translated := toMarshalableTaskList(tasks)

Callers

nothing calls this directly

Calls 1

fromMarshalableTaskListFunction · 0.85

Tested by

no test coverage detected