Fixed validation of JSON

Put in a catch to prevent the extraneous comma that was breaking JSON
validation