added JSON export for automation.