json.decode(json_string)
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
json.encode
json.null