Pushes and retrieves aeson
Values to and from the Lua stack.
Nullvalues 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.
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.
hslua-aeson uses PVP Versioning.
jsonarray, which is the name of the registry slot holding the metatable given to array tables. Setting the corresponding registry value will affect all newly created array values.
Relaxed upper bound for mtl, allowing mtl-2.3.
Relaxed upper bound for aeson, allowing aeson-2.1.
- Relaxed upper bound for hslua-core and hslua-marshalling, allowing version 2.2 of both packages.
Update to hslua 2.1.
nullas light userdata: The
NULLpointer wrapped into a light userdata is used to encode the JSON null value.
pushNullfunction has been removed; use
Types that are instances of
FromJSONcan be marshalled/unmarshalled by using the new functions
pushKeyMapare considered an implementation detail and are no longer exported.
Array elements are now marked with a metatable. This avoids the need for an extra
0element in the table and offers flexibility for users who want to give special behavior to lists. The newly exported value
jsonarraycontains the name of the registry slot under which the metatable is stored. The table can be modified or replaced as required.
- Restored compatibility with aeson 1.5.
Changed module name from
The Peekable and Pushable instances have been removed. The package no longer defines orphaned instances.
Updated hslua and aeson to the respective 2.0 version.
- Allow hslua-1.3.*.
- Relaxed version constraint for hslua, allowing
Relaxed version constraint for aeson, allowing
Update CI tests to check with GHC versions 8.0 through 8.10. Compilation with GHC 7.10 is no longer tested.
Bump to stackage LTS-14.
- Relax version constraint for packages hashable and hslua,
Update to hslua 1.0.0
registerNullhas been replaced by
pushNullhas the advantage that users won’t have to remember to register a special variable. Users who need a global variable can set it by running
pushNull setglobal "HSLUA_AESON_NULL"
- Update to hslua 0.8.0.
Not publicly released.
- Update to hslua 0.6.0.
- Ensure compatibility with hslua 0.5.0.
- Initial release.