hslua-aeson: Allow aeson data types to be used with Lua.

[ foreign, library, mit ] [ Propose Tags ]

This package provides instances to push and receive any datatype encodable as JSON to and from the Lua stack.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4, 0.3.0, 0.3.0.1, 0.3.0.2, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.3.1, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.2.0.1, 2.2.1, 2.3.0, 2.3.0.1, 2.3.1
Change log CHANGELOG.md
Dependencies aeson (>=1.5 && <2.3), base (>=4.11 && <5), bytestring (>=0.10.2 && <0.13), containers (>=0.5.9 && <0.8), hashable (>=1.2 && <1.5), hslua-core (>=2.0 && <2.4), hslua-marshalling (>=2.1 && <2.4), mtl (>=2.2 && <2.4), scientific (>=0.3 && <0.4), text (>=1.2 && <2.2), unordered-containers (>=0.2 && <0.3), vector (>=0.7) [details]
License MIT
Copyright © 2017–2023 Albert Krewinkel
Author Albert Krewinkel
Maintainer Albert Krewinkel <tarleb@hslua.org>
Category Foreign
Home page https://hslua.org/
Source repo head: git clone https://github.com/hslua/hslua(hslua-aeson)
Uploaded by tarleb at 2024-01-18T16:57:06Z
Distributions Arch:2.3.0.1, Fedora:2.3.0.1, LTSHaskell:2.3.1, NixOS:2.3.0.1, Stackage:2.3.1, openSUSE:2.3.1
Reverse Dependencies 4 direct, 180 indirect [details]
Downloads 13687 total (315 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-01-18 [all 1 reports]

Readme for hslua-aeson-2.3.1

[back to package description]

hslua-aeson

MIT License

Pushes and retrieves aeson Values to and from the Lua stack.

  • Null values are encoded as light userdata containing the @NULL@ pointer.

  • Objects are converted to string-indexed tables.

  • Arrays are converted to sequence tables and are given a metatable. This makes it possible to distinguish between empty arrays and empty objects. The metatable is stored in the registry under key HsLua JSON array.

  • JSON numbers are converted to Lua numbers, i.e., Lua.Number; the exact C type may vary, depending on compile-time Lua configuration.

License

This project is licensed under the MIT license, the same license under which hslua and lua itself are published. See the LICENSE file for details.