--- parser3/tests/253.html 2010/09/24 22:56:35 1.3 +++ parser3/tests/253.html 2010/10/24 22:14:42 1.5 @@ -5,13 +5,21 @@ $s[^taint[as-is][$f.text]] ^try_catch{$o[^json:parse[$s]]} -$o[^json:parse[$s][ $.distinct[first] ]] +$o[^json:parse[$s][ $.object[$hook] $.distinct[first] ]] ^print[$o] $o[^json:parse[$s][ $.double(false) $.distinct[last] ]] ^print[$o] -$o[^json:parse[$s][ $.object[$hook] $.distinct[all] ]] +$o[^json:parse[$s][ $.object[$hook_key] $.distinct[all] ]] +^print[$o] + +$s[[1,{"type":"class1","value":"3"},4]] + +$o[^json:parse[$s][ $.object[$hook] ]] +^print[$o] + +$o[^json:parse[$s]] ^print[$o] @try_catch[code] @@ -29,6 +37,9 @@ $o[^json:parse[$s][ $.object[$hook] $.di @hook[key;value] $result[^if(def $value.type){^reflection:create[$value.type;create;$value]}{$value}] +@hook_key[key;value] +$result[^if($key eq 'object'){^reflection:create[$value.type;create;$value]}{$value}] + @CLASS class1