A simple JSON parser written from scratch in Haskell. This project demonstrates parsing principles using a custom parsing library and the Applicative and Alternative typeclasses.
- src/JsonParser.hs: Contains the core logic for parsing JSON values.
- src/Parser.hs: This is the custom parsing combinator library used by JsonParser.hs test/Main.hs: The test suite for the parser.
-
Install Haskell and Cabal if not already installed. You can follow the instructions here.
-
Clone the repository and navigate into the project directory:
git clone https://github.com/justromeon/jsonad.git cd codingbat
-
Install dependencies and build the project:
cabal update cabal build
-
Running the test
cabal test
This will run all the test cases.