added ability to export state machine to syntax highlighted JSON format