Is there currently a way to use Ktor and Flows tog...
# ktor
d
Is there currently a way to use Ktor and Flows together; so that an HTTP request could be responded to by a
Flow
of (serialized) objects i.e. delivered by HTTP streaming?
👀 4
I think this would be reasonably easy to achieve using a stream-capable JSON parser; since I'd expect the parser to consume any stream up to the point where a JSON object is completed; then I could repeat the process for n objects until the stream ends. Unfortunately I chose
kotlinx.serialization
for my project. While it's a great library in many aspects; it does not support streamed parsing! This makes it really unsuited to my use-case and is maybe why JetBrains haven't implemented this kind of feature already 😞