-Improved default null and value handing when JSON value is not compatible with property value
-Added interfaces, structs and enums as valid targets of JsonConverterAttribute
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#if !PocketPC && !NET20
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@@ -34,6 +35,8 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
public class DateTimeTestClass
|
||||
{
|
||||
public string PreField { get; set; }
|
||||
[DefaultValue("")]
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public DateTime DateTimeField { get; set; }
|
||||
public DateTimeOffset DateTimeOffsetField { get; set; }
|
||||
public string PostField { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user