You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For compatible JSON representations you should be using aeson's generic encoding/decoding with default options and encodeJson and decodeJson from "Data.Argonaut.Generic.Aeson" in purescript-argonaut-generic-codecs.
It would be great to be able to support custom instances of FromJSON/ToJSON.
I'd like to be able to have a model like this:
data Book = Book { title :: String, pages: Int }
with lenses
book ^. bookTitle
book ^. bookPages
and with json
{ "title": "Test", "pages": 50 }
instead of the ugly
{ "_bookTitle": "Test", "_bookPages": 50 }
The text was updated successfully, but these errors were encountered:
From README.md:
It would be great to be able to support custom instances of FromJSON/ToJSON.
I'd like to be able to have a model like this:
with lenses
and with json
instead of the ugly
The text was updated successfully, but these errors were encountered: