Elm in Production: 25K Lines Later
If decoding json in Elm is considered hard, I'd recommend checking out <i>miso</i> (<a href="https://github.com/dmjio/miso" rel="nofollow">https://github.com/dmjio/miso</a>), a Haskell re-implementation of the Elm arch. It has access to mature json libraries like <i>aeson</i> for that sort of thing, along with mature lens libraries for updating your model. Here's an example of decoding json with GHC.Generics using typeclasses. 
<a href="https://github.com/dmjio/miso/blob/master/examples/xhr/Main.hs#L130-L131" rel="nofollow">https://github.com/dmjio/miso/blob/master/examples/xhr/Main....</a>