New line character in JSON
问题 We are using a WCM tool for content entry and content editors will enter content having text and html in the tool. To convert the content into JSON we are using newton JSON as below where we are passing simple dictionary of keys and values: string output = JsonConvert.SerializeObject(nonJsonResult); Whenever editor gives content with new lines then we are getting the serailized JSON output with \r\n . Example input text: first line second line third line Output: { "test": "first line\r