Skip to content

Commit bd568ea

Browse files
committed
Document how to specify Jackson JSON view serialization hints
Closes gh-23150
1 parent d18d4d8 commit bd568ea

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/docs/asciidoc/web/webflux-functional.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,15 @@ ServerResponse.created(location).build();
182182
----
183183
====
184184

185+
Depending on the codec used, it is possible to pass hint parameters to customize how the
186+
body is serialized or deserialized. For example, to specify a https://wiki.fasterxml.com/JacksonJsonViews[Jackson JSON view]:
187+
188+
====
189+
[source,java]
190+
----
191+
ServerResponse.ok().hint(Jackson2CodecSupport.JSON_VIEW_HINT, MyJacksonView.class).body(...);
192+
----
193+
====
185194

186195

187196
[[webflux-fn-handler-classes]]

0 commit comments

Comments
 (0)