I should really write some elevator-pitch style examples to include here. Oh well.
Made with ❤️ and released under BSD3. My eternal thanks to @michaeljones for his invaluable feedback and continued discovery of edge-cases and bugs!
Contributions are super-welcome. For larger changes, please do contact me first on Slack so we can talk things through. For bugs or incorrect behaviour, open an issue so we can quickly hash out a decent solution, and get everyone on the same wavelength before any code is written. Contribution is collaboration, which can't happen in a void.
We have a decent test-suite, but the more the merrier. Additionally, every
example in the docs is verified using
elm-verify-examples. To make sure
everything still works,
npm test will check both.
Elm 0.19.0 compatibility 🎉
Json.Decode.Exploration.checkno longer includes the expected value in the error
Json.Decode.Exploration.Pipeline.checkedno longer includes the expected value in the error
A module that describes the location of an error or warning within the JSON. Using a single datatype to represent these means we get to treat them in a uniform way.
strict : DecodeResult a -> Result Errors a: interpret a decoderesult in
a strict manner; converting warnings to errors.
errorsToString: Turn the machine readable
Warnings into human readable
strict, this can be used to create a
Decoder a -> String
-> Result String a function for compatibility with the core API.
warn : String -> Decoder a -> Decoder a: attach a warning to a decoder.
ExpectedType: type to represent the expected type for errors.
Errorsare now defined in terms of the
Errornow has machine readable "expected type" errors.
Warningnow has a
Warning String Valueconstructor for arbitrary warnings.
isArray: ascertainments about structure without using contained values
isObjectto prevent marking unused contained values as having been used.
optionalAtnow 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.
optionalon an empty object.
Json.Decode.Exploration.check: verify the value of a field while decoding
checkedAt: verify values during decoding
ignoredAt: completely ignore values during decoding
Increased test coverage of
BadField errors weren't properly traced through the stack.
Increase test coverage of