@Test public void testMix() throws Exception { ObjectMapper om = new JacksonProvider().getContext(MixType.class); om.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); Mix mix = new Mix(); ScannerCapture scanner = new ScannerCapture(); scanner.setScannerManufacturer(MixUtils.stringType("ScannerManufacturer")); ImageCaptureMetadataType imageCaptureMetadata = new ImageCaptureMetadataType(); imageCaptureMetadata.setScannerCapture(scanner); mix.setImageCaptureMetadata(imageCaptureMetadata); String toJson = om.writeValueAsString(mix); Mix result = om.readValue(toJson, Mix.class); assertNotNull(result); assertEquals("ScannerManufacturer", result.getImageCaptureMetadata().getScannerCapture().getScannerManufacturer().getValue()); }
@Override public ObjectMapper getContext(Class<?> type) { return mapper; }
JacksonProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return mapper; } }
JacksonProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return mapper; } JacksonProvider(); }
JacksonProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return mapper; } JacksonProvider(); @Override ObjectMapper getContext(Class<?> type); }
JacksonProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return mapper; } JacksonProvider(); @Override ObjectMapper getContext(Class<?> type);  }