Hey Folks,
Fairly new to Jackson, so if this is covered in the docs somewhere, my apologies.
I'm working on a POC to serialize objects between Python and Java using a Python library called jsonpickle [1]
Everything has been working fine until I moved to a more complex scenario involving Python classes. In order to support proper deserialization into proper Python objects, I had to enable a flag that inserts type data into the stream (similar to Jackson). However, this flag is global. There currently is no way to turn this on and off per entity, i.e., include the metadata for Python objects, but not collection types such as Set.
Give the above, consider the following sent from Python to Java:
{
"py/object": "test.GetAll",
"@class": "test.GetAll",
"cacheName": "test-cache",
"keys":
{
"py/set": [ 1, 2 ]
}
}
The deserialization process chokes when dealing with the type py/set (stack trace [2] if anyone thinks it would help).
My question is this: Is there a configuration for Jackson such that if it comes across a field name that would typically be used for a type
and it doesn't understand said type, to fall back to reflection of the container object's bean type for that field?