FasterXML / FasterXML/jackson-dataformats-text
Async (non-blocking) support for CSV
- 主要言語
- Java
- スター
- 455
- フォーク
- 164
- 平均マージ
- 6日 10時間
- マージ済み PR(30日)
- 2
説明
This question relates to usage of Jackson DataFormats CSV within Spring WebFlux.
I have a REST controller (Spring WebFlux) which returns a Flux from a Stream of a simple bean (MapInfo). The endpoint serves application/json (only for demo) and application/x-ndjson (for large datasets). I'd like to add support for text/csv also.
```
@GetMapping(produces = { "application/json", "application/x-ndjson", "text/csv" })
public Flux mapInfo() {
return Flux.fromStream(mapInfoStream());
}
```
Invoking this for text/csv results in HTTP 500 with message:
`"No Encoder for [com.mizuho.fo.dataservices.hc.controller.MapInfoController$MapInfo] with preset Content-Type 'null'"`
**I have not yet added any Jackson Dataformat libraries so this is expected.**
Question: Does Jackson Dataformat CSV have the necessary non-blocking support in order for it to be used to convert the payload to CSV?
Of course I could be imperative and write code to format as CSV, returning a Flux of String for instance, but my hope is to effect CSV output without lowering the abstraction level beyond what is already there (returning a Flux from a Stream of the POJO).
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。