elsa-core/test
Robin Sue c4a6ce2796 Fix Primitive Collection serialization
This was broken by both #5871 and #5682:
1. When a List<Guid> was serialized, it was recognized as a primitive collection and thus plainly written to the JSON without any type information: ["d4d8404c-4357-47ff-a343-649a116539f5"]
2. When this JSON was deserialized, due to lack of type info, it was deserialized as List<object>, containing strings. This is already not good.
3. When this List<object> gets serialized again (e.g. due to multiple workflow suspends causing WorkflowState serialization), this time it fails the primitive collection recognition, because object is not a primitive type. It now gets serialized as {"_items": ["d4d8404c-4357-47ff-a343-649a116539f5"], "_type": "Object[]"}
4. When that JSON gets deserialized, it tries to ReadType() but ReadType() fails to parse Object[] since it lacks the logic from TypeJsonConverter to throw away the [] before looking up Object in the WellKnownTypeRegistry, so it returns null as a type. Without a type but being faced with a json object { ... } it now deserializes into an ExpandoObject
5. Any further serialization / deserializations will now cause the expando object to get nested deeper and deeper every time.
2024-12-04 15:47:01 +01:00
..
component Fix route data handling (#6176) 2024-12-04 11:31:03 +01:00
integration Fix Primitive Collection serialization 2024-12-04 15:47:01 +01:00
performance Enable CPM transitive pinning and resolve version conflicts (#6069) 2024-10-31 09:12:21 +01:00
unit Refactor Tenant Resolution to Use Async Local Storage for Operation-wide Access (#6022) 2024-10-12 12:08:09 +02:00
Directory.Build.props Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00