I should really write some elevator-pitch style examples to include here. Oh well.
Made with ❤️ and released under BSD3.
Json.Decode.Exploration.Pipeline.optional
andoptionalAt
now error when used on something that is not an object. The clue is that each field in the path is optional in the existential sense - if it simply does not exist, we dutifully use the provided fallback. However, if a field exists but does not point to an object, we now error out instead.- as a side effect, both of the above now correctly mark empty objects as having
been used, rather than giving a warning when using
optional
on an empty object.
Thanks to @michaeljones for surfacing this in #3.
Json.Decode.Exploration.check
: verify the value of a field while decodingJson.Decode.Exploration.Pipeline
:checked
andcheckedAt
: verify values during decodingignored
andignoredAt
: completely ignore values during decoding
Thanks to @michaeljones for the proposal.
Increased test coverage of Json.Decode.Exploration.Pipeline
.
BadField
errors weren't properly traced through the stack.
Increase test coverage of Json.Decode.Exploration
.