Skip to content

Learn json parsing in Elm #2

Description

@vsoch

Per notes from @ julianpistorius in #1 (comment) this is the next set of items I should tackle:


I think it's time to get familiar with JSON decoding, as well 'effects' (particularly making HTTP requests). Play around with these two examples:

- https://guide.elm-lang.org/effects/http.html
- https://guide.elm-lang.org/effects/json.html

Try the following:

- Change the views to use Elm-UI functions instead of Html functions
- Modify the JSON example to load the list of SCIF apps from this URL: https://sci-f.github.io/apps/api/index.json

The following resources on JSON decoders will help:

- https://github.com/zwilias/elm-demystify-decoders
- https://thoughtbot.com/blog/5-common-json-decoders
- https://thoughtbot.com/blog/getting-unstuck-with-elm-json-decoders

Once you've written a few simple JSON decoders by hand you might want to look at some of the Elm code generators:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions