@main[]
$f[^file::load[text;253_json.txt; $.charset[windows-1251]]]
$s[^taint[as-is][$f.text]]
^try_catch{$o[^json:parse[$s]]}
$o[^json:parse[$s][ $.distinct[first] ]]
^print[$o]
$o[^json:parse[$s][ $.double(false) $.distinct[last] ]]
^print[$o]
$o[^json:parse[$s][ $.object[$hook] $.distinct[all] ]]
^print[$o]
@try_catch[code]
^try{
$code
}{
$exception.handled(true)
$exception.source
$exception.comment
}
@print[hash]
^json:string[$hash; $.indent(1)]
@hook[key;value]
$result[^if(def $value.type){^reflection:create[$value.type;create;$value]}{$value}]
@CLASS
class1
@create[h]
$value[class1 $h.value]
@CLASS
class2
@create[h]
$value[class2 $h.value]
E-mail: