mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Document how to specify Jackson JSON view serialization hints
Closes gh-23150
This commit is contained in:
@@ -182,6 +182,15 @@ ServerResponse.created(location).build();
|
||||
----
|
||||
====
|
||||
|
||||
Depending on the codec used, it is possible to pass hint parameters to customize how the
|
||||
body is serialized or deserialized. For example, to specify a https://wiki.fasterxml.com/JacksonJsonViews[Jackson JSON view]:
|
||||
|
||||
====
|
||||
[source,java]
|
||||
----
|
||||
ServerResponse.ok().hint(Jackson2CodecSupport.JSON_VIEW_HINT, MyJacksonView.class).body(...);
|
||||
----
|
||||
====
|
||||
|
||||
|
||||
[[webflux-fn-handler-classes]]
|
||||
|
||||
Reference in New Issue
Block a user