elsa-core/test/integration/Elsa.Workflows.IntegrationTests/Serialization
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
..
ContainerSerialization Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
JsonSerialization Fix Serialization of generic types including collections (#6148) 2024-11-26 09:19:16 +01:00
Polymorphism Merge remote-tracking branch 'origin/patch/3.2.x' 2024-07-07 11:45:26 +02:00
ProgrammaticWorkflowsAndDelegates Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
SpecialPropertySerialization Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
VariableExpressions Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
VariableTypes Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00