Add Support for Jackson 3 (#742)
This change adds Jackson 3 support and aligns package naming in the existing Jackson 2 module. Specific changes: * Deprecated classes for removal in `io.modelcontextprotocol.json.jackson`/`io.modelcontextprotocol.json.schema.jackson` * Copied the above to `io.modelcontextprotocol.json.jackson2`/`io.modelcontextprotocol.json.schema.jackson2` in non-deprecated form. * Added tests for the default McpJsonMapper and JsonSchemaValidator
This commit is contained in:
parent
af65356416
commit
2456a0e433
1 changed files with 2487 additions and 21 deletions
|
|
@ -118,7 +118,8 @@ public class WebMvcStatelessServerTransport implements McpStatelessServerTranspo
|
|||
.handleRequest(transportContext, jsonrpcRequest)
|
||||
.contextWrite(ctx -> ctx.put(McpTransportContext.KEY, transportContext))
|
||||
.block();
|
||||
return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(jsonrpcResponse);
|
||||
String json = jsonMapper.writeValueAsString(jsonrpcResponse);
|
||||
return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(json);
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.error("Failed to handle request: {}", e.getMessage());
|
||||
|
|
|
|||
Loading…
Reference in a new issue