fix Issue 4178 - destructor missing in JSON output
Merge pull request #1518 from WalterBright/b20

fix Issue 4178 - destructor missing in JSON output