Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I have a class that overrides ToString() to convert the class to a string. Ie:
public override string ToString()
if( Id == -1 )
return Name + "\n" + Unit
+ "\n" + AddressLine1 + "\n" + AddressLine2 + "\n" + AddressLine3 + "\n" + AddressLine4
+ "\n" + City + "\n" + State + "\n" + PostCode + "\n" + Country;
I then I add the string to a JsonObject .
JsonObject JObject = new JsonObject();
JObject.Add( "Address", TheClass.ToString() );
I then generate the Json string using JsonObject.ToString(). Ie:
string JsonString = JObject.ToString();
When the string is generated the new lines are just passed straight through without being escaped, causing the receiving end to generate an error.
I thought that it was meant to escape all funny characters like \r \n \b \t.
Using the reproduction case above, I am not able to reproduce the error. Printing JObject.ToString(); to the console properly displays the values I entered with escaped new lines, as seen below.
Please reopen if you are still encountering this issue.
Tested against XA 4.6.6 (6d7480e9)