Content:MirLua/Examples/json

From Miranda NG
< Content:MirLua/Examples
Revision as of 23:20, 5 October 2017 by Unsane (talk | contribs) (Created page with "{{Content:MirLua/Example|code= local json = require('m_json') local value = json.Decode('[ true, { "foo": "bar" } ]') print( json.Encode(nil), json.Encode(true), j...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

local json = require('m_json') local value = json.Decode('[ true, { "foo": "bar" } ]') print(

   json.Encode(nil),
   json.Encode(true),
   json.Encode(123),
   json.Encode(3.21),
   json.Encode('test'),
   json.Encode({ true, { foo = "bar" } }),
   json.Encode(value))