elsa-core/test
Robin Sue 0a349451cd
Fix Serialization of generic types including collections (#6148)
#5682 broke serialization in two ways:
- When a generic type was being serialized, such as List`1, the ` was being escaped by JsonSerializer.Serialize to "\u0060". The PolymorphicObjectConverter would then .Trim('"') without unescaping the `, causing "\\u0060" to be written into the final json.
- When the type is generic with one type parameter, e.g. List<T>, and also IEnumerable<T>, as List<T> is, then it would append "[]" at the end of the type name, resulting in: "System.Collections.Generic.List\\u00601[[Elsa.Workflows.IntegrationTests.Serialization.JsonSerialization.WorkflowAction, Elsa.Workflows.IntegrationTests]], System.Private.CoreLib[]" which is very invalid. It may only do that, if the typename was simplified because the elementType is in the WellKnownTypeRegistry. And even then, this is questionable, as you'd be deserializing an string[] where you've serialized a List<string> for example.
2024-11-26 09:19:16 +01:00
..
component Add ExecuteWorkflow activity (#6134) 2024-11-21 16:44:25 +01:00
integration Fix Serialization of generic types including collections (#6148) 2024-11-26 09:19:16 +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