Skip to content

Commit 31b25b5

Browse files
committed
Make WebFlux Jackson refdoc section relevant for Smile
Issue: SPR-16151
1 parent 196f3f8 commit 31b25b5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/docs/asciidoc/web/webflux.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -522,20 +522,22 @@ To configure or customize the readers and writers to use applications will typic
522522

523523

524524

525-
[[webflux-codecs-jackson-json]]
526-
==== Jackson JSON
525+
[[webflux-codecs-jackson]]
526+
==== Jackson
527527

528528
The decoder relies on Jackson's non-blocking, byte array parser to parse a stream of byte
529529
chunks into a `TokenBuffer` stream, which can then be turned into Objects with Jackson's
530-
`ObjectMapper`.
530+
`ObjectMapper`. JSON and https://github.com/FasterXML/smile-format-specification[Smile]
531+
(binary JSON) data formats are currently supported.
531532

532533
The encoder processes a `Publisher<?>` as follows:
533534

534-
* if the `Publisher` is a `Mono` (i.e. single value), the value is encoded to JSON.
535-
* if media type is `application/stream+json`, each value produced by the
536-
`Publisher` is encoded individually to JSON followed by a new line.
535+
* if the `Publisher` is a `Mono` (i.e. single value), the value is encoded when available.
536+
* if media type is `application/stream+json` for JSON or `application/stream+x-jackson-smile`
537+
for Smile, each value produced by the `Publisher` is encoded individually (and followed
538+
by a new line in JSON).
537539
* otherwise all items from the `Publisher` are gathered in with `Flux#collectToList()`
538-
and the resulting collection is encoded as a JSON array.
540+
and the resulting collection is encoded as an array.
539541

540542
As a special case to the above rules the `ServerSentEventHttpMessageWriter` feeds items
541543
emitted from its input `Publisher` individually into the `Jackson2JsonEncoder` as a

0 commit comments

Comments
 (0)