restore newline suppression when writing in json mode