-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.3
-
Component/s: Serialization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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()