fix Issue 4178 - destructor missing in JSON output

fix Issue 4178 - destructor missing in JSON output

http://d.puremagic.com/issues/show_bug.cgi?id=4178