Added ability to output status as JSON.