Closed lemoer closed 3 years ago
I am a little bit confused about this PR - sorry, for the next question:
the PR looks really good:
so i am willing to merge it
Regarding your questions:
nodes.json
here, I would first have to download it completely, keep it in memory and then parse it. Keeping a nodes.json
in memory would require ~3MB of ram.raw.jsonl
file, I can process the information line by line during the download. After a line has been processed, it can be discarded. Therefore I only need a buffer that can hold one line at a time. This only requires ~1-3KB of ram.Thanks for the feedback. The patches broke during rebase. Things are fixed now. I also found that my last commit (from another PR) had unclean go-fmt. That's why I added a patch for it here first, so that the tests pass.
Description
This output takes the respondd response as sent by the node and includes it in a Line-Delimited JSON (JSONL) document. In this format each line can be interpreted as separate JSON element, which is useful for json streaming. The first line is json object holding the timestamp and version of the file. Then there follows one line for each node, each containing a json object.
An example output looks like this:
Signed-off-by: Leonardo Mörlein git@irrelefant.net
Motivation and Context
This is useful for json streaming.
Checklist: