Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eeue56/elm-alternative-json

An alternative to core's JSON decoder
https://github.com/eeue56/elm-alternative-json

Last synced: about 1 month ago
JSON representation

An alternative to core's JSON decoder

Awesome Lists containing this project

README

        

# elm-alternative-json
An alternative to core's JSON decoder! This package is mostly intended as a talking/starting point.

```
decodeModel : Json.Value -> Result String Model
decodeModel value =
Ok { name = "", age = 0 }
|> decodeField "age" Json.int setAge value
|> decodeField "name" Json.string setName value
```