Eliminates unnecessary newline characters from json