Posts

State of Elm 2018


The State of Elm 2018 is on! We put on this survey every year to take the pulse of the Elm community. Where have we been, and where are we going?

The survey is open now and will close on March 1. You can take it below or in full screen mode (better for mobile users.)

Read on

Breaking Down Decoders From the Bottom Up


Last week, we covered how to break down decoders by starting from the innermost, or topmost, part. But what if you’re having trouble breaking things down from the top? (Or you’re dealing with a really complex JSON schema?)

This week, let’s look at it from a different perspective: the outermost structure in (or the bottom up!)

Read on

Breaking Out of Deeply Nested JSON Objects


A reader of the JSON Survival Kit wrote me with a question (lightly edited):

I’ve got a JSON string that works fine in JavaScript:

{
  "Site1": {
    "PC1": {
      "ip": "x.x.x.x",
      "version": "3"
    },
    "PC2": {
      "ip": "x.x.x.x",
      "version": "3"
    }
  },
  "Site2": {
    "PC1": {
      "ip": "x.x.x.x",
      "version": "3"
    },
    "PC2": {
      "ip": "x.x.x.x",
      "version": "3"
    }
  }
}

I really can’t figure out how to parse this–will your book help with nested JSON where the keys are different 2 or 3 levels deep?

If not, then I’ll just give up on Elm–as this is the first project that I’m trying to do, and something as basic as this, I’m finding impossible.

The biggest mindset shift you need to succeed with JSON Decoding is to think of your decoders like bricks. (I’ve written about this before, and it’s chapter 1 of The JSON Survival Kit.) You can combine bricks to build whatever you like; the same is true of decoders!

Read on

State of Elm 2017 Results


The State of Elm 2017 results are here! I first presented these as two talks, one to Elm Europe and one to the Oslo Elm Day. I’ve embedded the Elm Europe talk below (it’s shorter) but the longer version is on also YouTube.

Read on

Sending Dates Through Elm Ports


So you’re sending dates through ports in your Elm application, and things are getting pretty confusing. You send in a date, and you get…

Err "Expecting a String a _.date but instead got \"2017-05-01T12:45:00.000Z\""

Wait, what? Isn’t that a string already? What’s going wrong here?

Read on