Skip to content

Support array of scalar values in Jackson2Tokenizer [SPR-16407] #20953

@spring-projects-issues

Description

@spring-projects-issues

Akshay Gupta opened SPR-16407 and commented

When using Spring Webflux's WebClient, it is not possible to deserialize a JSON array of integers using the bodyToFlux method. Spring returns an empty Flux. However, using bodyToMono to get a List<Integer> works and returns a Mono<List<Integer>> as expected.

I believe the problem lies in Jackson2Tokenizer's handling of this scenario. It returns an empty list of tokens. A variation of this issue was addressed in #20714. It addresses top-level scalar values returned as a JSON response. However, the fix for that still doesn't address the above scenario.

Original StackOverflow question


Affects: 5.0.3

Reference URL: https://github.com/Dolvic/spring-SPR-16407

Issue Links:

Referenced from: commits b474916

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions