# Generic decoding of json to an elm record

**URL:** <https://discourse.elm-lang.org/t/generic-decoding-of-json-to-an-elm-record/3767>\
**Category:** Learn\
**Created:** [June 7, 2019, 5:14pm UTC](https://discourse.elm-lang.org/t/generic-decoding-of-json-to-an-elm-record/3767 "2019-06-07T17:14:36Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![joelq](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/joelq/32/445_2.png) [@joelq](https://discourse.elm-lang.org/u/joelq)\
**Post date:** [June 11, 2019, 2:26pm UTC](https://discourse.elm-lang.org/t/generic-decoding-of-json-to-an-elm-record/3767/13 "2019-06-11T14:26:22Z")

</div>

> [@mezuzza](#):
>
> You’d end up with a dynamic language like python, ruby, or javascript. That’s the main reason some people like those languages more than statically typed languages like Elm. As much as it sucks to say, this is the cost of using Elm.

I came to Elm from a Ruby background and like many others was confused by JSON decoders. Now that I understand them, I wish I could use something like JSON decoders in my Ruby code, particularly when dealing with data that can be in multiple shapes 😅

---

_[View the full topic](https://discourse.elm-lang.org/t/generic-decoding-of-json-to-an-elm-record/3767)._
