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

[ foreign, library, mit ] [ Propose Tags ] [ Report a vulnerability ]

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

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

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, 2.3.1.1
Change log changelog.md
Dependencies aeson (>=0.11 && <1.6), base (>=4.7 && <5), hashable (>=1.2 && <1.4), hslua (>=1.0 && <1.1.1 || >=1.1.2 && <1.2), scientific (>=0.3 && <0.4), text (>=1.1.1.0 && <1.3), unordered-containers (>=0.2 && <0.3), vector (>=0.7) [details]
Tested with ghc ==8.0.2, ghc ==8.2.2, ghc ==8.4.3, ghc ==8.6.5, ghc ==8.8.3, ghc ==8.10.1
License MIT
Copyright © 2017–2020 Albert Krewinkel
Author Albert Krewinkel
Maintainer tarleb+hslua@zeitkraut.de
Revised Revision 1 made by tarleb at 2020-06-27T09:02:35Z
Category Foreign
Home page https://github.com/tarleb/hslua-aeson#readme
Source repo head: git clone https://github.com/hslua/hslua-aeson
Uploaded by tarleb at 2020-05-28T21:46:38Z
Distributions Arch:2.3.0.1, Fedora:2.3.0.1, LTSHaskell:2.3.1.1, NixOS:2.3.1.1, Stackage:2.3.1.1, openSUSE:2.3.1.1
Reverse Dependencies 4 direct, 182 indirect [details]
Downloads 16359 total (275 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-05-28 [all 1 reports]

Readme for hslua-aeson-1.0.2

[back to package description]

hslua-aeson

travis build status MIT License

Glue to hslua for aeson values.

This provides a StackValue instance for aeson's Value type. The following conventions are used:

  • Null values are encoded as a special value (stored in the registry field HSLUA_AESON_NULL). Using nil would cause problems with null-containing arrays.

  • Objects are converted to tables in a straight-forward way.

  • Arrays are converted to Lua tables. Array-length is included as the value at index 0. This makes it possible to distinguish between empty arrays and empty objects.

  • JSON numbers are converted to Lua numbers (usually doubles), which can cause a loss of precision.

License

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