Document error stuff a bit
commitddef23ce29665c19f6715a16bb5b26b1adc89218
authorMark Eibes <mark.eibes@gmail.com>
dateThu 21 Jul 2022, 19:16 (4 years ago)
parentb6b2a53
README.md+6
@@ -24,6 +24,12 @@ Check out the tests for how to encode/decode increasingly complex types.
2424
2525## Additions over `simple-json`
2626
27+### Errors
28+yoga-json will actually report multiple errors at once in the case of records, objects, and arrays.
29+There's also a way to make errors more readable with `renderHumanError`:
30+(e.g. `Must provide a value of type 'Int' instead of 'Object' at $.a.b.c.d[1]`)
31+
32+
2733### Tuples
2834There is an inbuilt codec for `Tuple`s thanks to @ursi
2935`yoga-json` represents tuples as arrays in JSON.