using EF & WCF RIA.
Let's suppose the entity is called Account and it has a related Person object. The json string , including the deserialized jobject, has this Person object and it's details. However, when I deserialize like
settings) - Person is null with no errors.
The settings I'm trying are here:
settings = new JsonSerializerSettings()
//CheckAdditionalContent = true,
PreserveReferencesHandling = PreserveReferencesHandling.All,
//ReferenceLoopHandling = ReferenceLoopHandling.Serialize
NullValueHandling = NullValueHandling.Ignore,
DefaultValueHandling = DefaultValueHandling.Ignore,
ObjectCreationHandling = ObjectCreationHandling.Replace,
TypeNameHandling = TypeNameHandling.Auto
Figured it out - by assigning a custom contract resolver and setting Ignored values to false.
public class DynamicContractResolver : DefaultContractResolver
protected override JsonProperty CreateProperty(System.Reflection.MemberInfo member, MemberSerialization memberSerialization)
var r = base.CreateProperty(member, memberSerialization);
r.Ignored = false;
But it doesn't make much sense on a deserialization things are being ignored. After all there's a finite amount of data in the Json string.