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
However, I have a "MessageCodec" for "User.class" so the conversion between json and object can be handled by "vertx" instead of "jackson" (faster?). I can not find a method where I can convert it explicitly by using this MessageCodec:
Actually I have do something like this:
UserCodec c = new UserCodec();
String json = c.encodeToWire(Buffer.buffer(), d);
User user = c.decodeFromWire(0, Buffer.buffer());
Would be nice if vetx can provide something like this:
// use static method of my custom MessageCodec to get JsonObject
JsonObject jsonObject = UserCodec.toJson(User);
// use my custom MessageCodec for conversion
User javaObject = UserCodec.fromJson(json);
The text was updated successfully, but these errors were encountered:
According to docs we can map between json and java object by using Jackson’s ObjectMapper#convertValue():
However, I have a "MessageCodec" for "User.class" so the conversion between json and object can be handled by "vertx" instead of "jackson" (faster?). I can not find a method where I can convert it explicitly by using this MessageCodec:
Actually I have do something like this:
Would be nice if vetx can provide something like this:
The text was updated successfully, but these errors were encountered: