Module:JSON/testcases

From solab
Revision as of 14:35, 6 January 2016 by imported>Gio
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

local json = require('Module:JSON') local p = {} local test = {}

function p.hello() test = json.decode('{\'Hello\':\'Salutamu\'}');

return test['Hello'] end



function p.hello1()

       local t = {}
        t['gio'] =1;

test = json.encode(t);

return test end

return p