Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justinwoo/purescript-howto-foreign-generic
A tutorial for how to use Purescript's Foreign Generics library
https://github.com/justinwoo/purescript-howto-foreign-generic
generic-rep purescript purescript-foreign purescript-foreign-generic
Last synced: 28 days ago
JSON representation
A tutorial for how to use Purescript's Foreign Generics library
- Host: GitHub
- URL: https://github.com/justinwoo/purescript-howto-foreign-generic
- Owner: justinwoo
- Created: 2017-01-30T15:23:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-08T07:44:30.000Z (over 6 years ago)
- Last Synced: 2024-11-14T02:07:02.238Z (2 months ago)
- Topics: generic-rep, purescript, purescript-foreign, purescript-foreign-generic
- Language: PureScript
- Homepage:
- Size: 12.7 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# purescript-howto-foreign-generic [![Build Status](https://travis-ci.org/justinwoo/purescript-howto-foreign-generic.svg?branch=master)](https://travis-ci.org/justinwoo/purescript-howto-foreign-generic)
See the blog post about this here: http://qiita.com/kimagure/items/00f97c7fc6cef178fa3c
## Note!!! Do you need to just get some simple JSON parsed? Give [Simple-JSON](https://github.com/justinwoo/purescript-simple-json) a try!
## Important: Changes from Video and Slides
The lesson/slides were made with the previous version of foreign-generics. Here's a somewhat quick rundown of what's changed:
| Old name | New name |
|----------|----------|
| IsForeign | Decode |
| AsForeign | Encode |
| write | encode |
| read | decode |
| readJSON | decodeJSON |
| readGeneric | genericDecode |
| toForeignGeneric | genericEncode |This repo presents many common usages for [Purescript-Foreign-Generic](https://github.com/paf31/purescript-foreign-generic).
If you're just getting started, you might be interested in [this repo](https://github.com/justinwoo/simple-record-foreign-generic-demo/blob/master/README.md) instead.
[Egghead lesson for basic introduction to Purescript-Foreign-Generic here
![](http://i.imgur.com/uf6SH0H.png)
](https://egghead.io/lessons/automatically-de-serialize-json-with-purescript-foreign-generics)[See the slides about this repo and purescript-foreign-generics here!
![](http://i.imgur.com/LGgtQKb.png)
](https://speakerdeck.com/justinwoo/serialization-with-purescript)