comparison mod_rest/jsonmap.lib.lua @ 3912:1df4900bbd29

mod_rest: Fix another missing switch from array to map in json mapping
author Kim Alvefur <zash@zash.se>
date Wed, 26 Feb 2020 20:51:38 +0100
parents d5ecb9b9cb3b
children ea59c9455f93
comparison
equal deleted inserted replaced
3911:064c32a5be7c 3912:1df4900bbd29
290 cmd:up(); 290 cmd:up();
291 elseif type(s.note) == "table" then 291 elseif type(s.note) == "table" then
292 cmd:text_tag("note", s.note.text, { type = s.note.type }); 292 cmd:text_tag("note", s.note.text, { type = s.note.type });
293 end 293 end
294 if s.form then 294 if s.form then
295 cmd:add_child(dataform[5] (s.form)); 295 cmd:add_child(dataform.json2st(s.form));
296 elseif s.data then 296 elseif s.data then
297 cmd:add_child(formdata(s.data)); 297 cmd:add_child(formdata(s.data));
298 end 298 end
299 return cmd; 299 return cmd;
300 elseif type(s) == "string" then -- assume node 300 elseif type(s) == "string" then -- assume node