-Added StringEscapeHandling with options to escape HTML and non-ASCII characters
-Added feature to deserialize ISet<T> properties as HashSet<T> -Fixed ReferenceLoopHandling not being used when serializing ISerializable and dynamic values
This commit is contained in:
@@ -556,11 +556,14 @@ namespace Newtonsoft.Json
|
||||
/// Converts the <see cref="String"/> to its JSON string representation.
|
||||
/// </summary>
|
||||
/// <param name="value">The value to convert.</param>
|
||||
/// <param name="delimter">The string delimiter character.</param>
|
||||
/// <param name="delimiter">The string delimiter character.</param>
|
||||
/// <returns>A JSON string representation of the <see cref="String"/>.</returns>
|
||||
public static string ToString(string value, char delimter)
|
||||
public static string ToString(string value, char delimiter)
|
||||
{
|
||||
return JavaScriptUtils.ToEscapedJavaScriptString(value, delimter, true);
|
||||
if (delimiter != '"' && delimiter != '\'')
|
||||
throw new ArgumentException("Delimiter must be a single or double quote.", "delimiter");
|
||||
|
||||
return JavaScriptUtils.ToEscapedJavaScriptString(value, delimiter, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user