I need to deserialize custom JSON to anonymous C# object.
My sample JSON (can be any, even with nested properties as objects):
var json = "{ 'Surname': 'Wick'}";
And I want to be deserialized as:
var jsonResult = new { Surname = "Wick" };
But I end up with something like this:

dynamicand notobjectjsonResult.Surnamein the watchjsonResult.Surname- with the object you'll get an exception, with dynamic you'll get the value. In both cases you get a dynamic object but in theobjectcase it is cased to object... Also you can have a look under theDynamic Viewline:)Json.Decode... different frameworks, each with its own implementation