Copyright | © 2017 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <tarleb@zeitkraut.de> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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 the special global_NULL
. UsingNil
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.
- module Scripting.Lua
- newstate :: IO LuaState
Documentation
module Scripting.Lua
newstate :: IO LuaState Source #
Create a new lua state suitable for use with aeson values. This behaves
like newstate
in hslua, but initializes the _NULL
global. That variable
is used to encode null values.
Orphan instances
StackValue Scientific Source # | |
StackValue Text Source # | |
StackValue Value Source # | Hslua StackValue instance for the Aeson Value data type. |
StackValue a => StackValue (Vector a) Source # | |
(Eq a, Hashable a, StackValue a, StackValue b) => StackValue (HashMap a b) Source # | |