JSON Decoders talk
- Just get Elm installed with create-elm-app
- Basic Syntax of Elm
- Why JSON decoders?
- Basically all external services talk in JSON
- Elm's types are close to JSON but are not the same
- There's no guerentee that the external thing will return things in the right form. To be safe we have to be defensive
- What is a JSON decoder
- It's a list of instructions on how to turn JSON into elm types
- It's a pure data structure not a function, although it can contain functions for the more difficult parts
- It contains two values:
- Json to be queried and prodded at
- A single value of the decoders result so far which can be in one of 3 states:
- Nothing (you haven't began decoding)
- A decoded value
- An Error
talks Elm