-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Add kotlinx.serialization JSON support to Spring WebFlux #25771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Kotlin/kotlinx.serialization#1073 should bring deserialization of big JSON arrays to |
IMO non-blocking parsing is actual for streaming use cases only. But most of microservices workloads operate on memory fit (request) buffers so it can be considered as CPU only workload in parsing phase. In such case parsing can be performed as map step on fully populated buffer (ie ByteArray). |
Yes we plan to do that but I think Kotlin/kotlinx.serialization#1073 is only for big arrays so no support plain stream of multiple JSON objects. |
I think Roman Elizarov mentioned arrays only as obvious example of such streaming cases. So new polymorphic parser can skip unknown types as such new pull-parsing API must support skipping too. And there is another use cases such as pre-parsing filters/transformers. |
Kotlin full stack projects (we have one - Kofu+KotlinJS+React) can have significant benefit from this feature. We're all waiting for! |
For streaming I don't think we so at least for now, we discussed that with Roman and I think the decision was to support only arrays for now since for most use cases the framing is already handled by the underlying protocol (SSE, RSocket). |
As a follow up of #21188, we should add support for kotlinx.serialization JSON to WebFlux. This will not support
Flow
decoding because the library does not support yet non-blocking parsing of JSON tokens like Jackson does.The text was updated successfully, but these errors were encountered: