Package io.quarkus.vertx.runtime.jackson
Class QuarkusJacksonJsonCodec
java.lang.Object
io.quarkus.vertx.runtime.jackson.QuarkusJacksonJsonCodec
- All Implemented Interfaces:
io.vertx.core.spi.json.JsonCodec
The functionality of this class is copied almost verbatim from
io.vertx.core.json.jackson.DatabindCodec.
The difference is that this class obtains the ObjectMapper from Arc in order to inherit the
user-customized ObjectMapper.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.core.JsonParsercreateParser(io.vertx.core.buffer.Buffer buf) static com.fasterxml.jackson.core.JsonParsercreateParser(String str) <T> TfromBuffer(io.vertx.core.buffer.Buffer buf, Class<T> clazz) static <T> TfromParser(com.fasterxml.jackson.core.JsonParser parser, Class<T> type) <T> TfromString(String str, Class<T> clazz) <T> Tstatic com.fasterxml.jackson.databind.ObjectMappermapper()static voidreset()io.vertx.core.buffer.BufferMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.vertx.core.spi.json.JsonCodec
toBuffer, toString
-
Constructor Details
-
QuarkusJacksonJsonCodec
public QuarkusJacksonJsonCodec()
-
-
Method Details
-
reset
public static void reset() -
mapper
public static com.fasterxml.jackson.databind.ObjectMapper mapper() -
fromValue
- Specified by:
fromValuein interfaceio.vertx.core.spi.json.JsonCodec
-
fromString
- Specified by:
fromStringin interfaceio.vertx.core.spi.json.JsonCodec- Throws:
io.vertx.core.json.DecodeException
-
fromBuffer
public <T> T fromBuffer(io.vertx.core.buffer.Buffer buf, Class<T> clazz) throws io.vertx.core.json.DecodeException - Specified by:
fromBufferin interfaceio.vertx.core.spi.json.JsonCodec- Throws:
io.vertx.core.json.DecodeException
-
createParser
public static com.fasterxml.jackson.core.JsonParser createParser(io.vertx.core.buffer.Buffer buf) -
createParser
-
fromParser
public static <T> T fromParser(com.fasterxml.jackson.core.JsonParser parser, Class<T> type) throws io.vertx.core.json.DecodeException - Throws:
io.vertx.core.json.DecodeException
-
toString
- Specified by:
toStringin interfaceio.vertx.core.spi.json.JsonCodec- Throws:
io.vertx.core.json.EncodeException
-
toBuffer
public io.vertx.core.buffer.Buffer toBuffer(Object object, boolean pretty) throws io.vertx.core.json.EncodeException - Specified by:
toBufferin interfaceio.vertx.core.spi.json.JsonCodec- Throws:
io.vertx.core.json.EncodeException
-