Yes :) It’s also worth noting that http://json2elm.com can help automate a lot of the decoders/encoders here too. It’s not perfect, but it helps get the large chunks of boilerplate out of the way and give you some idea about what you need to do. It also allows you to put in old style decoders, and upgrade them to Json.Decode.Pipeline.
disclaimers: I am the author of json2elm and a co-author of Json.Decode.Pipeline too. I still think neither are perfect though.
To my eyes, the
Json.Decode.Pipelineapproach shown here seems a lot nicer.Yes :) It’s also worth noting that http://json2elm.com can help automate a lot of the decoders/encoders here too. It’s not perfect, but it helps get the large chunks of boilerplate out of the way and give you some idea about what you need to do. It also allows you to put in old style decoders, and upgrade them to Json.Decode.Pipeline.
disclaimers: I am the author of json2elm and a co-author of Json.Decode.Pipeline too. I still think neither are perfect though.