Update mapper to save as json

Updated the mapper to pass json to the reducer.