-Added nullable DateTime support to IsoDateTimeConverter and JavaScriptDateTimeConverter
-Added WriteValue overloads to JsonWriter for nullable types -Fixed JsonTextWriter.WriteValue(string) to write null instead of an empty string for a null value -Fixed JsonWriter.WriteValue(object) to no longer error on null values
This commit is contained in:
@@ -1325,11 +1325,15 @@ keyword such as type of business.""
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DeserializeStringDate()
|
||||
public void DeserializeNullable()
|
||||
{
|
||||
string dateText = @"""\/Date(1221644506800-0700)\/""";
|
||||
string json;
|
||||
|
||||
json = JavaScriptConvert.SerializeObject((int?)null);
|
||||
Assert.AreEqual("null", json);
|
||||
|
||||
json = JavaScriptConvert.SerializeObject((int?)1);
|
||||
Assert.AreEqual("1", json);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user