FIX: encoding of JSON strings with embedded newline or carriage-return.