-Added additional ToString overloads to JValue
-Fixed poor error message when dynamic type cannot be created during deserialization -Fixed error when setting a null value on a dynamic type during deserialization -Fixed JsonTextReader.ReadAsDecimal not attempting to convert string values to decimal
This commit is contained in:
@@ -458,6 +458,30 @@ namespace Newtonsoft.Json.Linq
|
||||
return _value.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="System.String"/> that represents this instance.
|
||||
/// </summary>
|
||||
/// <param name="format">The format.</param>
|
||||
/// <returns>
|
||||
/// A <see cref="System.String"/> that represents this instance.
|
||||
/// </returns>
|
||||
public string ToString(string format)
|
||||
{
|
||||
return ToString(format, CultureInfo.CurrentCulture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="System.String"/> that represents this instance.
|
||||
/// </summary>
|
||||
/// <param name="formatProvider">The format provider.</param>
|
||||
/// <returns>
|
||||
/// A <see cref="System.String"/> that represents this instance.
|
||||
/// </returns>
|
||||
public string ToString(IFormatProvider formatProvider)
|
||||
{
|
||||
return ToString(null, formatProvider);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="System.String"/> that represents this instance.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user