Fixed bug with typeString where textFields could generate bad JSON if serialized after newline