4 ms·
Can you not do the same thing as JSON.parse() in Elm by parsing into an unstructured JSON type?
by maxiepoo 9y ago
Can you not do the same thing as JSON.parse() in Elm by parsing into an unstructured JSON type?
- mjaniczek 9y agoParsing into Json.Encode.Value gives you that Value but no way to work with it except, at later time, using Json.Decode.decodeValue on it. And you're back to specifying decoders...
- maxiepoo 9y agoSeems like you could easily make a library that just parses into some Union type that represents JSON values. It's likely a design decision to force people that otherwise wouldn't to represent their data in a more structured way.