LuaSTG-x Core API
|
Public Member Functions | |
static function | decode (local s, local startPos) |
static function | encode (local v) |
static function | null () |
array of commandline arguments
string[]
Decodes a JSON string and returns the decoded value as a Lua data structure / value.
s | string @The string to scan. |
startPos | number @Optional starting position where the JSON string is located. Defaults to 1. |
Encodes an arbitrary Lua object / variable.
v | table @The Lua object / variable to be JSON encoded. |
static function null | ( | ) |
The null function allows one to specify a null value in an associative array (which is otherwise
discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null }