Added JSON Implementation

Added JSON output. Now file outputs string data (in the form of
output.txt) and JSON output (in the form of output.json)