Posts

State of Elm 2018 Results


The State of Elm survey takes the pulse of the Elm community. What experiences do newcomers have, and are they learning at decent pace? What companies have Elm in production?

This year, the survey ran from the end of Janary to the beginning of March, and collected 1,176 responses (about the same as last year.) After the survey ended, I scrubbed each field for 17 of the questions to make sure we had good data, reduced five of the questions to tags, and performed the analysis below. I know it’s been a long wait; thank you for your patience while I did this, and to all the people who checked in and asked if they could help!

Let’s get going!

Read on

Let's Make Nice Packages!


This year at Elm Europe I gave a talk called “Let’s Make Nice Packages!”

It’s about research.

No, wait, come back!

Read on

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