question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support JSON Lines encoder for a stream response

See original GitHub issue

JSON 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:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
amitvccommented, Apr 9, 2021

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

0reactions
amitvccommented, Apr 13, 2021

Thanks @ikhoon . Thanks for the clarification.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found