Thanks so much, Peter & Brian, I had earlier found your article re: dates, but revisiting it now has helped! Yep, I like the idea of keeping that function as agnostic as possible, i.e., out of a Decoder.
Thanks again for your help, I really appreciate it. On Thursday, 2 March 2017 03:40:12 UTC+13, Brian Hicks wrote: > > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
