Skip to content

Instantly share code, notes, and snippets.

@stuartnelson3
stuartnelson3 / bash_strict_mode.md
Created April 11, 2022 10:31 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@stuartnelson3
stuartnelson3 / decode.md
Created October 10, 2016 06:58 — forked from yang-wei/decode.md
Elm Json.Decode tutorial and cheatsheet

When receiving JSON data from other resources(server API etc), we need Json.Decode to convert the JSON values into Elm values. This gist let you quickly learn how to do that.

I like to follow working example code so this is how the boilerplate will look like:

import Graphics.Element exposing (Element, show)
import Task exposing (Task, andThen)
import Json.Decode exposing (Decoder, int, string, object3, (:=))

import Http