Index: openacs-4/packages/acs-tcl/tcl/json-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/json-procs.tcl,v diff -u -r1.11.2.6 -r1.11.2.7 --- openacs-4/packages/acs-tcl/tcl/json-procs.tcl 25 Jul 2024 09:19:52 -0000 1.11.2.6 +++ openacs-4/packages/acs-tcl/tcl/json-procs.tcl 26 Jul 2024 10:00:46 -0000 1.11.2.7 @@ -693,11 +693,10 @@ lappend result [$n nodeName] $childrendValue } ARRAY { - if {[$n nodeName] ne "arraycontainer"} { - lappend result [$n nodeName] $childrendValue - } else { - lappend result $childrendValue - } + if {[$n nodeName] ne "arraycontainer" || $parentType eq "OBJECT"} { + lappend result [$n nodeName] + } + lappend result $childrendValue } default { set op [expr {[llength $nodes] > 1 ? "lappend" : "set"} ] Index: openacs-4/packages/acs-tcl/tcl/test/json-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/json-test-procs.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/acs-tcl/tcl/test/json-test-procs.tcl 25 Jul 2024 09:19:52 -0000 1.1.2.4 +++ openacs-4/packages/acs-tcl/tcl/test/json-test-procs.tcl 26 Jul 2024 10:00:46 -0000 1.1.2.5 @@ -46,4 +46,12 @@ }} set jsonDict [util::json2dict $json] aa_equals literal-objectcontainer $jsonDict {Titel Wirtschaftsinformatik nested {a 1 b {o1 1 o2 2} objectcontainer {o3 3 o4 4}} objectcontainer {a b c d}} + + set json {{ + "Titel": "Wirtschaftsinformatik", + "nested": {"a":1, "b":{"o1":1,"o2":2}, "objectcontainer": {"o3":3,"o4":4}}, + "arraycontainer": ["a", [1,2,3], "c"] + }} + set jsonDict [util::json2dict $json] + aa_equals literal-arraycontainer $jsonDict {Titel Wirtschaftsinformatik nested {a 1 b {o1 1 o2 2} objectcontainer {o3 3 o4 4}} arraycontainer {a {1 2 3} c}} }