Update to write JSON output like the previous version.