From 581cf3a0a5624c6d0b12d7516d15fe98cb698cc6 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Thu, 7 May 2015 10:28:30 +0200 Subject: [PATCH] Fix JSON Views code sample in the documentation Issue: SPR-12994 --- src/asciidoc/index.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index ed39acb823..4c8b224faa 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -42363,9 +42363,9 @@ to serialize only a subset of the object properties. For example: [source,java,indent=0] [subs="verbatim,quotes"] ---- - JacksonSerializationValue jsv = new JacksonSerializationValue(new User("eric", "7!jd#h23"), - User.WithoutPasswordView.class); - HttpEntity entity = new HttpEntity(jsv); + MappingJacksonValue value = new MappingJacksonValue(new User("eric", "7!jd#h23")); + value.setSerializationView(User.WithoutPasswordView.class); + HttpEntity entity = new HttpEntity(value); String s = template.postForObject("http://example.com/user", entity, String.class); ----