You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i just stumbled upon a use case where i want to fill a anonymous object with values coming from json:
var o = new { foo = "123", bar = "456" };
JsonConvert.PopulateObject(@"{'foo': 'abc'}", o);
Console.WriteLine(o.foo); // outputs "123" instead of "abc"
but it does not work as long as o is of anonymous type.
The text was updated successfully, but these errors were encountered:
i see, didn't know too much about anonymous types. there would be a way by modifying their backing fields but i guess you wouldn't want that it in the lib.
i just stumbled upon a use case where i want to fill a anonymous object with values coming from json:
but it does not work as long as o is of anonymous type.
The text was updated successfully, but these errors were encountered: