This commit is contained in:
James Newton-King
2014-09-25 21:04:24 +12:00
parent 2faf5059bf
commit 6a22345e28
5 changed files with 38 additions and 13 deletions
+7 -5
View File
@@ -409,11 +409,6 @@ namespace Newtonsoft.Json
return ToString(value, '"');
}
public static string ToString(string value, StringEscapeHandling stringEscapeHandling)
{
return ToString(value, '"', stringEscapeHandling);
}
/// <summary>
/// Converts the <see cref="String"/> to its JSON string representation.
/// </summary>
@@ -425,6 +420,13 @@ namespace Newtonsoft.Json
return ToString(value, delimiter, StringEscapeHandling.Default);
}
/// <summary>
/// Converts the <see cref="String"/> to its JSON string representation.
/// </summary>
/// <param name="value">The value to convert.</param>
/// <param name="delimiter">The string delimiter character.</param>
/// <param name="stringEscapeHandling">The string escape handling.</param>
/// <returns>A JSON string representation of the <see cref="String"/>.</returns>
public static string ToString(string value, char delimiter, StringEscapeHandling stringEscapeHandling)
{
if (delimiter != '"' && delimiter != '\'')