Module:JSON/testcases

From solab
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