Prevent Impossible States with JSON Decoders in Elm


The part how it proposes to do the decoding with different constructors of a custom type is interesting.

In general the problem is the typical problem, how to encode tagged sum types in languages that don’t have them. In this case json. What status is in this example is often called kind or type. See

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.