RENDER(Request& context) { DValue t; <>
t.get_or_create("a")->set("valueA");
t.get_or_create("b")->set("valueB");
t.get_or_create("c")->get_or_create("c-dt")->set_bool(true);
t.get_or_create("c")->get_or_create("c-df")->set_bool(false);
t.get_or_create("c")->get_or_create("c-e")->set("valueCE");
t.get_or_create("c")->get_or_create("c-f")->set(&t);
t.get_or_create("g")->get_or_create("g-h")->get_or_create("h-i")->set("valueHI");
t["g"]["x"]["y1"] = "XYZ1";
t["g"]["x"]["y2"] = &t;
t["g"]["x"]["y3"] = time();
t["g"]["x"]["y4"] = "Ünicödä";
t["l"] = context.params;
String j;
print(j = json_encode(t));
?>
Parsed:
print(var_dump( json_decode(j) )); ?>Compare:
print(var_dump( t )); ?>Params
= var_dump(context.params) ?>> }