updating json_writer.rb