Update to JSON to not write an empty object if the view we are writing is empty