Package io.moderne.jsonrpc.formatter
Class JsonMessageFormatter
java.lang.Object
io.moderne.jsonrpc.formatter.JsonMessageFormatter
- All Implemented Interfaces:
MessageFormatter
-
Constructor Summary
ConstructorsConstructorDescriptionJsonMessageFormatter(com.fasterxml.jackson.databind.Module... modules) JsonMessageFormatter(com.fasterxml.jackson.databind.ObjectMapper mapper) -
Method Summary
Modifier and TypeMethodDescription<T> TconvertValue(Object value, Type type) Converts a value (typically from JSON-RPC params or result) to the specified type.voidserialize(JsonRpcMessage message, OutputStream out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.moderne.jsonrpc.formatter.MessageFormatter
getEncoding
-
Constructor Details
-
JsonMessageFormatter
public JsonMessageFormatter() -
JsonMessageFormatter
public JsonMessageFormatter(com.fasterxml.jackson.databind.Module... modules) -
JsonMessageFormatter
public JsonMessageFormatter(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
deserialize
- Specified by:
deserializein interfaceMessageFormatter- Throws:
IOException
-
serialize
- Specified by:
serializein interfaceMessageFormatter- Throws:
IOException
-
convertValue
Description copied from interface:MessageFormatterConverts a value (typically from JSON-RPC params or result) to the specified type.- Specified by:
convertValuein interfaceMessageFormatter
-