Fix JSON Views code sample in the documentation

Issue: SPR-12994
master
Sebastien Deleuze 10 years ago
parent 98f8838173
commit 2b2186781b
  1. 6
      src/asciidoc/integration.adoc

@ -1258,9 +1258,9 @@ to serialize only a subset of the object properties. For example:
[source,java,indent=0] [source,java,indent=0]
[subs="verbatim,quotes"] [subs="verbatim,quotes"]
---- ----
JacksonSerializationValue jsv = new JacksonSerializationValue(new User("eric", "7!jd#h23"), MappingJacksonValue value = new MappingJacksonValue(new User("eric", "7!jd#h23"));
User.WithoutPasswordView.class); value.setSerializationView(User.WithoutPasswordView.class);
HttpEntity<JacksonSerializationValue> entity = new HttpEntity<JacksonSerializationValue>(jsv); HttpEntity<MappingJacksonValue> entity = new HttpEntity<MappingJacksonValue>(value);
String s = template.postForObject("http://example.com/user", entity, String.class); String s = template.postForObject("http://example.com/user", entity, String.class);
---- ----

Loading…
Cancel
Save