All Projects â†’ zwilias â†’ Elm Demystify Decoders

zwilias / Elm Demystify Decoders

Licence: other
💡 Figure out how JSON decoders in Elm work by writing them. Step by step.

Programming Languages

elm
856 projects

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].