simple-json
開発者はJustin Woo
github
docs
以下のような型に対しては特に定義を追加する必要なく使える
numbers
booleans
strings
arrays
上の4つで構成されるrecord
https://purescript-simple-json.readthedocs.io/en/latest/quickstart.html
読む
他の章も
error message
型が異なる時
code:error
Can't parse JSON. (NonEmptyList (NonEmpty (ErrorAtProperty "userId" (TypeMismatch "String" "Number")) Nil))
Stringが指定されてるが、実際のJSONの返り値はNumberやで、というerror
ちなみに、Intでも大丈夫
https://speakerdeck.com/justinwoo/easy-json-deserialization-with-simple-json-and-record
slide
https://qiita.com/kimagure/items/7d777826acf371293a93
https://purescript-simple-json.readthedocs.io/en/latest/inferred-record-types.html
#??
すごいんだろうけど、具体的に何がスゴイのか理解していないので、理解したい
purescript-argonautとは何が違うのか
ReadFOreignのinstanceは絶対に定義無いといけないのか
Genericを使ってらくしたりできないのか
https://qiita.com/kimagure/items/00f97c7fc6cef178fa3c
https://qiita.com/kimagure/items/d8a0681ae05b605c5abe
https://qiita.com/kimagure/items/801e1c55d4f8f218f11e
https://qiita.com/kimagure/items/43fd7b02db2950f04a1a
https://qiita.com/kimagure/items/b65b604ee1d23554c9f4
https://qiita.com/kimagure/items/e7ec54af9d0b2c6c7f0e
https://qiita.com/kimagure/items/4f5c6054870f631ff768