Library of Functions


Description


A unique value that will be encoded as a null in a json.encode() method.
 
Scope
This constant is only defined in the scope of a virtual device.  It will not work in a scene.

Examples


jsonTable = { value1 = 512, value2 = json.null }
jsonString = json.encode(jsonTable)
 
-- after encoding jsonString variable contains '{ "value2": null, "value1": 512 }' string
fibaro:debug(jsonString)
 
-- null will be decoded to json.null value
jsonTable = json.decode(jsonString)
if(jsonTable.value2 == json.null)
then
  fibaro:debug('null value successfully decoded')
end

See Also


json.decode
json.encode