Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/eeue56/elm-alternative-json
- Owner: eeue56
- License: bsd-3-clause
- Created: 2017-03-02T00:57:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-02T22:48:39.000Z (almost 8 years ago)
- Last Synced: 2024-05-21T12:33:36.727Z (8 months ago)
- Language: Elm
- Size: 4.88 KB
- Stars: 12
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```