Generic decoding of json to an elm record

What I’m trying to say is that completely dynamic records is just not mathematically possible, implicit or otherwise. You’d have to be able to define a function like so:

parseJson: String -> {a | ???}

At compile time, you’d have to be able to fill in ???. Unfortunately, the type of ??? is “literally anything”. You’d end up with a dynamic language like python, ruby, or javascript.

That’s the main reason some people like those languages more than statically typed languages like Elm. As much as it sucks to say, this is the cost of using Elm. Just decide whether the benefit you’re getting from defining the schema upfront is worth it when choosing Elm. Personally, I think the benefit WAY outweighs the cost.