Support JSON Lines encoder for a stream response
See original GitHub issueJSON Lines is another JSON serialization format that can send a stream of JSON data. Currently, Armeria only supports JSON Text sequences format using JsonTextSequences. It would be nice to add a decoder that converts a stream of Java plain objects to JsonLines format.
HttpResponse response = JsonLines.fromPublisher(StreamMessage.of(foo, bar));
As a separate issue, supporting annotation service is also useful for users.
@ProducesJsonLines
public Publisher<MyObject> jsonLines() {
return StreamMessage.of(foo, bar)
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Support JSON Lines encoder for a stream response - - Bountysource
Support JSON Lines encoder for a stream response. ... Currently, Armeria only supports JSON Text sequences format using JsonTextSequences.
Read more >JSON Lines format is what you need for data streams.
JSON Lines is appealing format for data streaming. Since every new line means a separate entry makes the JSON Lines formatted file streamable....
Read more >JSON Lines
Documentation for the JSON Lines text file format · 1. UTF-8 Encoding · 2. Each Line is a Valid JSON Value · 3....
Read more >json — JSON encoder and decoder — Python 3.11.1 ...
Serialize obj as a JSON formatted stream to fp (a .write() -supporting file-like object) using this conversion table. If skipkeys is true (default:...
Read more >3 techniques to stream JSON in Spring WebFlux
Look carefully! Each line is a standalone, valid JSON. However, the whole response body is not a valid JSON. It's just a collection...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ikhoon Can I please pick this issue ? I am also done with other 2 issues I am working on.
Thanks @ikhoon . Thanks for the clarification.