parseJSON is the FromJSON method that turns a JSON Value into a Haskell value through a Parser, reporting failure when the input does not match. section 16.1.1
A typical implementation:
- Uses withObject to require a JSON object and produce clearer type errors. section 16.1.1
Parsing a TodoEntry
instance J.FromJSON TodoEntry where parseJSON = todoEntryParser Valid JSON produces a TodoEntry; omitting required checked produces the error key "checked" not found.
