Streaming parsers for file formats like JSON and YAML
reparsec
is a resumable, backtracking parser (like attoparsec), that works on any token and can produce any type of error message (like megaparsec). It's used as an auxilliary package forparsax
.parsax
is the main package that can parse either JSON or YAML in a streaming fashion, protects against security attacks, it can explain what it can parse (like optparse-applicative), and is written in applicative style.
Go to the parsax
directory for more explanation.
Milestone | Status | Appraisal |
---|---|---|
Test suite | ✔️ | Easy |
High-level GADT for parser | ✔️ | Fairly straight-forward |
Avoiding collision exploits | ✔️ | Difficult |
Resumable parsing with backtracking | ✔️ | Difficult |
Output warnings of ignored object keys | ✔️ | Easy |
Custom errors | ✔️ | Straight-forward |
Running m (IO/RIO) actions in a user parser | ✔️ | Fairly straight-forward |
YAML backend | ✔️ | Straight-forward |
JSON backend | ✔️ | Fairly straight-forward |
Documentation generator | ✔️ | Straight-forward |
Deal with utf8 strictly | ✔️ | Straight-forward |
Deal with duplicate keys | ✔️ | Straight-forward |
Supplying extra limits (array length, etc.) | ✔️ | Easy |
Set hard limit on number of warnings generated | ✔️ | Fairly easy |
Cleaned up, robust documentation generator | - | Fairly straight-forward |
Include line/col info in errors | - | Fairly easy |
Get code coverage to near 100% | - | Detailed |
Memory/allocation tests | - | Fairly straight-forward |
Update copyright (esp. from aeson, yaml) before publication | - | Easy |