Seconding what Peter said! I think the approach you've got here (String -> 
OrderStatus) is good. If you don't specialize it to a decoder you can do a 
lot more with it (testing, other serialization methods.) Composing those 
functions together is the way to go.

I've also written about this, but in the context of 
dates: 
https://www.brianthicks.com/post/2017/01/13/create-custom-json-decoders-in-elm-018/

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to