escape line endings before attempting to convert to json
Merge pull request #455 from JonRowe/escape_line_endings_in_json

Escape line endings before attempting to convert to json