haskell / aeson

A fast Haskell JSON library
Other
1.26k stars 321 forks source link

Error message quality: `parse` vs `iparse` #1057

Open marcosh opened 1 year ago

marcosh commented 1 year ago

The usage of parse or iparse produce different error messages, since the former is excluding the information about the JSONPath of where the parse error happened.

This means that different functions (e.g. fromJSON and decodeEither) will produce error messages with different error quality.

I think it would be interesting to at least document which functions produce error messages which provide information on the error path and which ones do not