https://github.com/zwilias/elm-demystify-decoders
💡 Figure out how JSON decoders in Elm work by writing them. Step by step.
https://github.com/zwilias/elm-demystify-decoders
elm-lang json-decoding
Last synced: 16 days ago
JSON representation
💡 Figure out how JSON decoders in Elm work by writing them. Step by step.
- Host: GitHub
- URL: https://github.com/zwilias/elm-demystify-decoders
- Owner: zwilias
- License: bsd-3-clause
- Created: 2017-05-08T19:43:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-06-02T07:47:52.000Z (almost 2 years ago)
- Last Synced: 2025-03-31T21:42:49.520Z (about 2 months ago)
- Topics: elm-lang, json-decoding
- Language: Elm
- Homepage: https://blog.ilias.xyz/demystifying-decoders-d294ed35bc6e
- Size: 177 KB
- Stars: 170
- Watchers: 7
- Forks: 25
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Demystifying JSON decoders
Some people learn best by reading, others learn by best exploring and
experimenting. This project caters to the latter.Decoding JSON in Elm can often feel daunting and difficult, even to experienced
developers. The exercises in this project attempt to guide you through JSON
decoding, by gradually increasing the level of complexity.## Starting the exercises
- Clone this repository
- Install `elm` and `elm-test`
- Open the project in your editor## Installing `elm` and `elm-test`
There are a couple of options. You can either install them globally, using `npm -g i elm elm-test` or using `yarn global add elm elm-test`, or locally in the scope of this project using either `npm i` or `yarn install`.
## Running the tests for a specific exercise
After solving an exercise, for example `Exercise01`, you can run the tests for
that exercise. The method you use will depend on how you chose to install `elm`
and `elm-test`:- `elm-test tests/Exercise01` - if you installed it globally
- `npm run elm-test tests/Exercise01` - locally using `npm`
- `yarn elm-test tests/Exercise01` - locally using `yarn`