Retrieves an Aeson Value from the Lua stack.
Modulehslua-aeson-2.3.1Haskell2010
HsLua.Aeson
Pushes and retrieves aeson Values to and from the Lua stack.
JSON
nullvalues are encoded as light userdata containing theNULLpointer.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'' (see also jsonarray).JSON numbers are converted to Lua numbers, i.e., Number; the exact C type may vary, depending on compile-time Lua configuration.
- 7 values
- Packagehslua-aeson-2.3.1
- Exports7
- LanguageHaskell2010
- LicenceMIT
- SourceAeson.hs
Hslua StackValue instance for the Aeson Value data type.
Retrieves a value from the Lua stack via JSON.
Pushes a value to the Lua stack as a JSON-like value.
Name of the registry slot holding the metatable given to array tables. The registry entry can be replaced with a different table if needed.
Encoding arbitrary objects
2 declarationsGets the ToAeson function from a Lua userdata object.
Pushes a function that converts the object at a given index into a Value.