You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer I want to be able to use collection types with complex data structures in variables. By complex data type, we mean everything besides Integer, Long, Float, String (so types supported by Jackson in a native way).
Due to the limitation of Jackson/SPIN, if you serialize a collection type of a custom datatype, the JSON output looks like:
For a complex type in the collection (here in Kotlin):
data class ComplexDataStructure(
val stringValue: String,
val intValue: Int,
val dateValue: Date
)
As a result, the de-seririalization of such an array of values is not possible, since Jackson is missing the type information. To overcome this there are several alternatives. For example, you can configure Jackson ObjectMapper to write FQCN into JSON, but this creates a unneeded dependency between JSON and your Java code.
As an additional feature, the library should provide variable factories for collections using a special serialization wrapper object. In addition, those factories should be constructed using overloaded methods of listVariable(name, type, useWrapperType), setVariable(name, type, useWrapperType), mapVariable(name, type, useWrapperType) and create WrappedListVariableFactory, WrappedSetVariableFactory and WrappedMapVariableFactory.
The implementation of those factories should write a wrapper object containing the list, the set and the map as a member but doesn't expose that object to the user, but just use it for the serialization.
The text was updated successfully, but these errors were encountered:
As a developer I want to be able to use collection types with complex data structures in variables. By complex data type, we mean everything besides Integer, Long, Float, String (so types supported by Jackson in a native way).
Due to the limitation of Jackson/SPIN, if you serialize a collection type of a custom datatype, the JSON output looks like:
For a complex type in the collection (here in Kotlin):
As a result, the de-seririalization of such an array of values is not possible, since Jackson is missing the type information. To overcome this there are several alternatives. For example, you can configure Jackson ObjectMapper to write FQCN into JSON, but this creates a unneeded dependency between JSON and your Java code.
As an additional feature, the library should provide variable factories for collections using a special serialization wrapper object. In addition, those factories should be constructed using overloaded methods of
listVariable(name, type, useWrapperType)
,setVariable(name, type, useWrapperType)
,mapVariable(name, type, useWrapperType)
and createWrappedListVariableFactory
,WrappedSetVariableFactory
andWrappedMapVariableFactory
.The implementation of those factories should write a wrapper object containing the list, the set and the map as a member but doesn't expose that object to the user, but just use it for the serialization.
The text was updated successfully, but these errors were encountered: