xc-jp / aeson-commit Goto Github PK
View Code? Open in Web Editor NEWParse Aeson data with commitment
Parse Aeson data with commitment
When I build this package with the mtl-2.3
release I get this failure:
src/Data/Aeson/Commit.hs:64:40: error:
Not in scope: type constructor or class ‘ExceptT’
|
64 | newtype Commit a = Commit {unCommit :: ExceptT [Parser Void] Parser a}
| ^^^^^^^
This build failure is due to haskell/mtl#117 which will be fixed in a follow-up release of mtl
.
Building with a version of mtl
that includes a fix to that issue, I'm getting
src/Data/Aeson/Commit.hs:73:3: error:
Variable not in scope:
lift :: Parser b -> ExceptT [Parser Void] Parser b
|
73 | lift $ post a
| ^^^^
Commit
doesn't really matterNow that we require newer Aeson versions, aeson-commit doesn't build cleanly on nix. Add nix code to handle getting the correct versions of Aeson and its dependencies
The aeson library has the concept of a JSONPath that is shown on parse errors like
Error in $.posts[0].comments[2]: <error text>
These JSONPaths are discarded when parsing using Commit
, so while the backtracking is limited to output the error message at the relevant point, the error messages are still quite uninformative if the source JSON is large.
The tests are out of phase with the code
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.