1. 14

  2. 7

    A very nice post on Elm coding in general! Alternate title: Parsing JSON in a strongly typed language means writing the structure of that json in said language. Its a common challenge and I’ve recenly come across some helpful sites to take a blob of json and write the code that matches its structure.

    Elm = http://json2elm.com/ Go = https://mholt.github.io/json-to-go/

    1. 1

      Hey man, I really liked your link! Thanks for sharing it!

    2. 6

      This is a good start! I imagine they might go into it later in the series but RemoteData is super useful here: http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html

      1. 1

        Hey Brian, This is awesome! I will try to talk about that later! And Yeah, this was a good starting point about getting data from APIs, in this case, just JSON ;)

      2. 0

        God forbid the API returns XML.

        1. 2

          I can try to cover XML in another blog post! Thanks for your feedback! ;)

          1. 2

            I made the comment because, last time I looked, there were not decoders for XML available in ELM. Good article.

            1. 1

              I’m thinking about that and searchinng… Then I found a question from you: https://stackoverflow.com/questions/40097133/parsing-xml-in-elm haha

              Did you check this: http://package.elm-lang.org/packages/eeue56/elm-xml/latest ?
              1. 2

                Thanks. The initial commit is from this year, so I don’t think it existed when I last looked. Will try it.