{"_id":"@buckeye/bs-aeson","_rev":"3-ff1dabc4d8c717ca15c99bef0c865838","name":"@buckeye/bs-aeson","dist-tags":{"latest":"3.0.1"},"versions":{"3.0.0":{"name":"@buckeye/bs-aeson","version":"3.0.0","description":"BuckleScript JSON serializations that match Haskell aeson","main":"index.js","scripts":{"build":"bsb -make-world","clean":"bsb -clean-world","test":"npm run build && jest && npm run test:examples","test:examples":"npm run build && ./run_examples.sh"},"repository":{"type":"git","url":"git+https://github.com/plow-technologies/bs-aeson.git"},"keywords":["bucklescript","json","aeson"],"author":{"name":"mchaver"},"license":"MIT","bugs":{"url":"https://github.com/plow-technologies/bs-aeson/issues"},"homepage":"https://github.com/plow-technologies/bs-aeson#readme","devDependencies":{"@glennsl/bs-jest":"^0.4.2","bs-platform":"^4.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2017 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@buckeye/bs-aeson@3.0.0","dist":{"shasum":"161e38bf2683aa478db6e40de8319431ef7925aa","tarball":"https://registry.npmjs.org/@buckeye/bs-aeson/-/bs-aeson-3.0.0.tgz","fileCount":42,"unpackedSize":154479,"integrity":"sha512-kHtDTjEZMgzm8vaIU3aaNdthaIs2nmUtaUVwrCH0wa4v4Ko3vkhIwXr/yy2d3o7l5WDk8eteJb+OGVX/iRczVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVv0YBaGDTfE8D3+HUNRikQK/9GhiNpddvRAOkkJFx3gIgct4Og2t8XzJIlJmjo/6Xt0vSpZFzD1OedUdCUYjXiNw="}]},"maintainers":[{"name":"dvisz-inf","email":"dviszneki@influential.co"},{"name":"scull7","email":"scull7@gmail.com"}],"_npmUser":{"name":"scull7","email":"scull7@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bs-aeson_3.0.0_1532731507763_0.49915886654497"},"_hasShrinkwrap":false},"3.0.1":{"name":"@buckeye/bs-aeson","version":"3.0.1","description":"BuckleScript JSON serializations that match Haskell aeson","main":"index.js","scripts":{"build":"bsb -make-world","clean":"bsb -clean-world","test":"npm run build && jest && npm run test:examples","test:examples":"npm run build && ./run_examples.sh"},"repository":{"type":"git","url":"git+https://github.com/plow-technologies/bs-aeson.git"},"keywords":["bucklescript","json","aeson"],"author":{"name":"mchaver"},"license":"MIT","bugs":{"url":"https://github.com/plow-technologies/bs-aeson/issues"},"homepage":"https://github.com/plow-technologies/bs-aeson#readme","devDependencies":{"@glennsl/bs-jest":"^0.4.2","bs-platform":"^4.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2017 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@buckeye/bs-aeson@3.0.1","dist":{"shasum":"29d5d4bcaa2c87baf62d24911bf511d6bcd72296","tarball":"https://registry.npmjs.org/@buckeye/bs-aeson/-/bs-aeson-3.0.1.tgz","fileCount":42,"unpackedSize":154479,"integrity":"sha512-LL7rti/Z5NTkgHp/htX5XxAeD+W7yArod2/z02gG7wDcSIYoW9YKL+G5nKNnDxeWKjjm8tKFlziCjLDZ4dsGGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDP+TCgqgwqOAfrEDBPiOC5YlEHXWpFQ9U96GgiBBlR2AiEAoedIfOOV6KIseZl0X4mRLyHcH+CSGKK5/NbTVbTT+/Q="}]},"maintainers":[{"name":"dvisz-inf","email":"dviszneki@influential.co"},{"name":"scull7","email":"scull7@gmail.com"}],"_npmUser":{"name":"scull7","email":"scull7@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bs-aeson_3.0.1_1533249597885_0.4031872753374617"},"_hasShrinkwrap":false}},"time":{"created":"2018-07-27T22:45:07.707Z","3.0.0":"2018-07-27T22:45:07.859Z","modified":"2022-06-12T15:32:00.616Z","3.0.1":"2018-08-02T22:39:57.988Z"},"maintainers":[{"name":"dvisz-inf","email":"dviszneki@influential.co"},{"name":"scull7","email":"scull7@gmail.com"}],"description":"BuckleScript JSON serializations that match Haskell aeson","homepage":"https://github.com/plow-technologies/bs-aeson#readme","keywords":["bucklescript","json","aeson"],"repository":{"type":"git","url":"git+https://github.com/plow-technologies/bs-aeson.git"},"author":{"name":"mchaver"},"bugs":{"url":"https://github.com/plow-technologies/bs-aeson/issues"},"license":"MIT","readme":"# bs-aeson\n\n## Example\n\n```ml\n(* OCaml *)\ntype line = {\n  start: point;\n  end_: point;\n  thickness: int option\n}\nand point = {\n  x: float;\n  y: float\n}\n\nmodule Decode = struct\n  let point json =\n    let open! Aeson.Decode in {\n      x = json |> field \"x\" float;\n      y = json |> field \"y\" float\n    }\n\n  let line json =\n    Aeson.Decode.{\n      start     = json |> field \"start\" point;\n      end_      = json |> field \"end\" point;\n      thickness = json |> optional (field \"thickness\" int)\n    }\nend\n\nlet data = {| {\n  \"start\": { \"x\": 1.1, \"y\": -0.4 },\n  \"end\":   { \"x\": 5.3, \"y\": 3.8 }\n} |}\n\nlet line = data |> Js.Json.parseExn\n                |> Decode.line\n```\n\n```reason\n/* Reason */\ntype line = {\n  start: point,\n  end_: point,\n  thickness: option int\n}\nand point = {\n  x: float,\n  y: float\n};\n\nmodule Decode = {\n  let point json =>\n    Aeson.Decode.{\n      x: json |> field \"x\" float,\n      y: json |> field \"y\" float\n    };\n  \n  let line json =>\n    Aeson.Decode.{\n      start:     json |> field \"start\" point,\n      end_:      json |> field \"end\" point,\n      thickness: json |> optional (field \"thickness\" int)\n    };\n};\n\nlet data = {| {\n  \"start\": { \"x\": 1.1, \"y\": -0.4 },\n  \"end\":   { \"x\": 5.3, \"y\": 3.8 }\n} |};\n\nlet line = data |> Js.Json.parseExn\n                |> Decode.line;\n```\n\n\n## Installation\n\n```sh\nnpm install --save bs-aeson\n```\n\nThen add `bs-aeson` to `bs-dependencies` in your `bsconfig.json`:\n```js\n{\n  ...\n  \"bs-dependencies\": [\"bs-aeson\"]\n}\n```\n\n## Changes\n\n### 3.0.0\n\n* Change `Aeson.Decode.int64` to decode a literal.\n* Move previous definition of `Aeson.Decode.int64` to `Aeson.Decode.int64_of_array` and `Aeson.Encode.int64` to `Aeson.Decode.int64_to_array`.\n* Bring back `Aeson.Compatibility.Either` and the definitions of `Aeson.Decode.boolean` and `Aeson.Encode.boolean` from `1.1.0`.\n* Add `Aeson.Compatibility.Either.to_result` and `Aeson.Compatibility.Either.of_result`.\n\n### 2.0.0\n\n* Remove support for `Js.boolean`. Remove `Aeson.Decode.boolean`, `Aeson.Decode.booleanArray`, `Aeson.Encode.boolean` and `Aeson.Encode.boolean`.\n* Remove `Aeson.Compatibility`, `Aeson.Decode.either` and `Aeson.Encode.either` depend on `Belt.Result.t`.\n* Remove `Aeson.Option`. These functions are now available in the BuckleScript stdlib Belt in `Belt.Option`.\n* Add `Aeson.Decode.boolArray`, `Aeson.Encode.boolArray`, `Aeson.Decode.int32`, `Aeson.Encode.int32`, `Aeson.Decode.int64`, `Aeson.Encode.int64`, `Aeson.Decode.nativeint`, `Aeson.Encode.nativeint`, `Aeson.Decode.result`, `Aeson.Encode.result`.\n* Require BuckleScript >= 3.1.0.\n\n### 1.1.0\n\n* Add `Aeson.Encode.singleEnumerator` and `Aeson.Decode.singleEnumerator` to support Haskell aeson style of serializing a enumeration type with only a single enumerator (as an empty JSON list `[]`).\n\n* Add `Aeson.Compatibility.Either` and serialization functions.\n\n* Fix `Aeson.Encode.date` and `Aeson.Decode.int`.\n\n### 1.0.0\n\n* Fork from [bs-json](https://github.com/reasonml-community/bs-json).\n\n* Add `Aeson.Decode.date`, `Aeson.Decode.tuple2`, `Aeson.Decode.tuple3`, `Aeson.Decode.tuple4`, `Aeson.Decode.tuple5`, `Aeson.Decode.tuple6`, `Aeson.Decode.unwrapResult`.\n\n* Add `Aeson.Encode.tuple2`, `Aeson.Encode.tuple3`, `Aeson.Encode.tuple4`, `Aeson.Encode.tuple5`, `Aeson.Encode.tuple6`.\n","readmeFilename":"README.md"}