Can someone riddle me this please...
An instance of the following Envelope class with the email property set to "This is line1\nThis is line 2". Essentially the emailBlurb property contains a carriage returned captured by the client application.
public class Envelope
{
public string emailBlurb;
}
When serialized to json the net result is..
{
"emailBlurb": "This is line1\\nThis is line 2".
}
Json dictates that special characters will be transported using an escaping backslash. So far everything seems fine except when I create the envelope with message ends of literally being:
This is line1\nThis is line 2
If I modify the json after serialization to replace "\\n" with "\n" DocuSign accepts the carriage return as desired and the message format suits the user...
This is line 1
This is line 2
While I suppose where needed I can 'correct' the results of the json serializer this seems like a hack. Is this a bug on DocuSign's service receiving end?
JSON.net is the serializer in question if that's of interest.