Newtonsoft JSON - Dynamic Objects Newtonsoft JSON - Dynamic Objects json json

Newtonsoft JSON - Dynamic Objects


You can try this:

dynamic task = JObject.Parse(rawJson);

Documentation: Querying JSON with dynamic


In my case it turned out I was catching first chance exceptions, so although this exception was being thrown it was not, in fact, preventing my code from executing.

It would still be nice to know why this happens for some content deserialized by Json.NET, but not all content. For example, I have a dynamic object i serialize with json.net in a unit test, then deserialize the serialized content. The serialized content looks identical to content which, at run time, causes runtime binder exceptions to be thrown.


I had the same problem.

Json.NET 6.0.4 cause this issue.You should change it to Json.Net 6.0.5.None of the project should reference to Json.NET 6.0.4 .

Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for solution...and check, if any of the projects use Json.NET 6.0.4, fix them.