Class JacksonMcpJsonMapper
java.lang.Object
io.modelcontextprotocol.json.jackson.JacksonMcpJsonMapper
- All Implemented Interfaces:
McpJsonMapper
@Deprecated(forRemoval=true,
since="18.0.0")
public final class JacksonMcpJsonMapper
extends Object
implements McpJsonMapper
Deprecated, for removal: This API element is subject to removal in a future version.
Jackson-based implementation of JsonMapper. Wraps a Jackson ObjectMapper but keeps the
SDK decoupled from Jackson at the API level.
-
Constructor Summary
ConstructorsConstructorDescriptionJacksonMcpJsonMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new JacksonMcpJsonMapper instance with the given ObjectMapper. -
Method Summary
Modifier and TypeMethodDescription<T> TconvertValue(Object fromValue, TypeRef<T> type) Deprecated, for removal: This API element is subject to removal in a future version.<T> TconvertValue(Object fromValue, Class<T> type) Deprecated, for removal: This API element is subject to removal in a future version.com.fasterxml.jackson.databind.ObjectMapperDeprecated, for removal: This API element is subject to removal in a future version.Returns the underlying JacksonObjectMapperused for JSON serialization and deserialization.<T> TDeprecated, for removal: This API element is subject to removal in a future version.<T> TDeprecated, for removal: This API element is subject to removal in a future version.<T> TDeprecated, for removal: This API element is subject to removal in a future version.<T> TDeprecated, for removal: This API element is subject to removal in a future version.byte[]writeValueAsBytes(Object value) Deprecated, for removal: This API element is subject to removal in a future version.writeValueAsString(Object value) Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
JacksonMcpJsonMapper
public JacksonMcpJsonMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new JacksonMcpJsonMapper instance with the given ObjectMapper.- Parameters:
objectMapper- the ObjectMapper to be used for JSON serialization and deserialization. Must not be null.- Throws:
IllegalArgumentException- if the provided ObjectMapper is null.
-
-
Method Details
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()Deprecated, for removal: This API element is subject to removal in a future version.Returns the underlying JacksonObjectMapperused for JSON serialization and deserialization.- Returns:
- the ObjectMapper instance
-
readValue
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
readValuein interfaceMcpJsonMapper- Throws:
IOException
-
readValue
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
readValuein interfaceMcpJsonMapper- Throws:
IOException
-
readValue
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
readValuein interfaceMcpJsonMapper- Throws:
IOException
-
readValue
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
readValuein interfaceMcpJsonMapper- Throws:
IOException
-
convertValue
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
convertValuein interfaceMcpJsonMapper
-
convertValue
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
convertValuein interfaceMcpJsonMapper
-
writeValueAsString
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeValueAsStringin interfaceMcpJsonMapper- Throws:
IOException
-
writeValueAsBytes
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeValueAsBytesin interfaceMcpJsonMapper- Throws:
IOException
-
JacksonMcpJsonMapperinstead. Will be removed in 19.0.0