Decode a given JSON buffer to a POJO of the given class type runs in to exception
Exception:
io.vertx.core.json.DecodeException: Failed to decode
at io.vertx.core.json.jackson.JacksonCodec.cast(JacksonCodec.java:346)
at io.vertx.core.json.jackson.JacksonCodec.fromParser(JacksonCodec.java:183)
at io.vertx.core.json.jackson.JacksonCodec.fromBuffer(JacksonCodec.java:73)
at io.vertx.core.json.Json.decodeValue(Json.java:123)
With vertx 3 I can call, to get a Message Object. But not with vertx 4.
Message msg= Json.decodeValue(data, Message.class);
private static T io.vertx.core.json.jackson.JacksonCodec.cast(Object o, Class clazz) {
if (o instanceof Map) { // o is a LinkedHashMap
if (!clazz.isAssignableFrom(Map.class)) { // clazz is my Message-class.
throw new DecodeException("Failed to decode");
}
..
}
Decode a given JSON buffer to a POJO of the given class type runs in to exception Exception: io.vertx.core.json.DecodeException: Failed to decode at io.vertx.core.json.jackson.JacksonCodec.cast(JacksonCodec.java:346) at io.vertx.core.json.jackson.JacksonCodec.fromParser(JacksonCodec.java:183) at io.vertx.core.json.jackson.JacksonCodec.fromBuffer(JacksonCodec.java:73) at io.vertx.core.json.Json.decodeValue(Json.java:123)
With vertx 3 I can call, to get a Message Object. But not with vertx 4. Message msg= Json.decodeValue(data, Message.class);
private static T io.vertx.core.json.jackson.JacksonCodec.cast(Object o, Class clazz) {
if (o instanceof Map) { // o is a LinkedHashMap
if (!clazz.isAssignableFrom(Map.class)) { // clazz is my Message-class.
throw new DecodeException("Failed to decode");
}
..
}