elgonzo

Results 144 comments of elgonzo

Fortunately, you can already achieve the desired functionality without requiring changes to the Newtonsoft.Json library. Unfortunately, it relies on Newtonsoft.Json functionality that is really. really, really poorly and insufficiently documented,...

(I deleted my previous second comment as it turns out that you don't need to do what i suggested there. If the json data for some enum value is just...

The problem is actually in the declaration of the `TestClass`. Nothing in that class ensures that the _Child_ member is **not** null when the _TestClass.TestProp_ get accessor is being invoked....

I can't say whether this is the correct way to resolve the issue, but just a note based on me skimming over your pull request: When a json value is...

> but checking for '{' is actually not for detecting an object just not to read past the '{'. An exception will still be thrown and error handling involved, but...

System.ExecutionEngineException indicates that some internal state inside the CLR / runtime went horribly wrong. In all likelihood this is _not_ caused by Newtonsoft.Json. The method call on which this exception...

I have difficulties understanding the motivation/purpose behind this. Here is why: Unless i am mistaken, for OptIn to make any sense it requires the participating properties/fields to be annotated with...

> To be clear, I'm completely fine with annotating with [JsonObject], I'd just rather not have to set MemberSerialization = MemberSerialization.OptIn every time. Maybe you could go for `[DataContract]`/`[DataMember]` instead...

If you have to stick with `[JsonProperty]`, there is still another possible way for you avoiding to specify `MemberSerialization = MemberSerialization.OptIn` in `[JsonObject]` attributes by using a custom contract resolver...

I just noticed a flaw in my example on dotnetfiddle. `DefaultContractResolver` normally caches the contracts of resolved types, thus the processing of the contract resolver should only be a one-time...