-Added FloatFormatHandling to JsonWriter/JsonSerializer/JsonSerializerSettings
-Added DateFormatString to JsonWriter/JsonSerializer/JsonSerializerSettings -Changed StringEnumConverter to convert an empty string to null for nullable enums -Changed NaN and Infinity floating point values to be serialized as strings by default
This commit is contained in:
@@ -210,6 +210,9 @@ namespace Newtonsoft.Json
|
||||
private DateFormatHandling _dateFormatHandling;
|
||||
private DateTimeZoneHandling _dateTimeZoneHandling;
|
||||
private StringEscapeHandling _stringEscapeHandling;
|
||||
private FloatFormatHandling _floatFormatHandling;
|
||||
private string _dateFormatString;
|
||||
private CultureInfo _culture;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates how JSON text output is formatted.
|
||||
@@ -247,6 +250,24 @@ namespace Newtonsoft.Json
|
||||
set { _stringEscapeHandling = value; }
|
||||
}
|
||||
|
||||
public FloatFormatHandling FloatFormatHandling
|
||||
{
|
||||
get { return _floatFormatHandling; }
|
||||
set { _floatFormatHandling = value; }
|
||||
}
|
||||
|
||||
public string DateFormatString
|
||||
{
|
||||
get { return _dateFormatString; }
|
||||
set { _dateFormatString = value; }
|
||||
}
|
||||
|
||||
public CultureInfo Culture
|
||||
{
|
||||
get { return _culture ?? CultureInfo.InvariantCulture; }
|
||||
set { _culture = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the <c>JsonWriter</c> class.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user