Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
2.3
-
None
Description
I'm trying to deserialize entire document that contains polymorphic collection to dynamic object.
And I expect that my collection will contain dynamic objects but I've got concrete types.
I've created pull request with fix and unit test.
Example data:
var json = "{ \"Shapes\" : [
,
{ \"_t\" : \"Square\", \"Side\" : 3 }] }";
Current behavior:
typeof(Circle) == obj.Shapes[0].GetType()
typeof(Square) == obj.Shapes[1].GetType()
Expected:
typeof(ExpandoObject) == obj.Shapes[0].GetType()
typeof(ExpandoObject) == obj.Shapes[1].GetType()