在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:justinwoo/purescript-simple-json开源软件地址:https://github.com/justinwoo/purescript-simple-json开源编程语言:PureScript 96.5%开源软件介绍:Purescript-Simple-JSONA simple Foreign/JSON library based on the Purescript's RowToList feature. QuickstartGet going quickly with the Quickstart section of the guide: https://purescript-simple-json.readthedocs.io/en/latest/quickstart.html You may also be interested in this presentation about how Simple-JSON works well with PureScript-Record: https://speakerdeck.com/justinwoo/easy-json-deserialization-with-simple-json-and-record. Note that the slides are based on an older version of the library and on PureScript 0.11.6, and it is not necessary to understand these slides to get started. UsageIn brief: type MyJSON =
{ apple :: String
, banana :: Int
, cherry :: Maybe Boolean
}
decodeToMyJSON :: String -> Either (NonEmptyList ForeignError) MyJSON
decodeToMyJSON = SimpleJSON.readJSON See the API Docs or the tests for usage. There is also a guide for how to use this library on Read the Docs.
Warning: |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论