Hi guys,

I have this kind of mapping:

class Foo {
 Object myData;
}

and i expect the serialization (i don't care of the other way) to respect
myData runtime type whatever it is (primitive, object, array).

Currently it doesnt work with our mapper and jsonb layer.

Do we want to fix it?

Current workaround i use is to not support arrays and have a type
serializer to support primitives or object but I cant see it being
reasonable:

public class GenericObjectSerializer implements JsonbSerializer<Object> {

    @Override
    public void serialize(final Object obj, final JsonGenerator
generator, final SerializationContext ctx) {
        ctx.serialize(obj, generator);
    }
}


Wdyt? Did I miss anything?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>

Reply via email to