Added some JSON file output functionality.
Added some JSON file output functionality.