JsonNode patchAsNode = mapper.readValue(readerInterceptorContext.getInputStream(), JsonNode.class);
JsonPatch patch = JsonPatch.fromJson(patchAsNode);
try {
// Apply the patch
JsonNode result = patch.apply(serverState);
// Stream the result & modify the stream on the readerInterceptor
ByteArrayOutputStream resultAsByteArray = new ByteArrayOutputStream();
mapper.writeValue(resultAsByteArray, result);
readerInterceptorContext.setInputStream(new ByteArrayInputStream(resultAsByteArray.toByteArray()));