diff --git a/hyptop/hyptop.8 b/hyptop/hyptop.8 index 75e63dd6..c36113e6 100644 --- a/hyptop/hyptop.8 +++ b/hyptop/hyptop.8 @@ -96,6 +96,17 @@ with an ASCII Record Separator character (0x1e) and suffixed with an ASCII Line Feed character (0x0a) in accordance with RFC7464. .BR +See section "OUTPUT FORMAT" for more details. +.BR +.PP +.IP \(bu 3 +.B jsonl: +Line-delimited JSON data structures + +Data for each iteration is formatted as a separate JSON data structure +separated by ASCII Line Feed character (0x0a, LF). +.BR + See section "OUTPUT FORMAT" for more details. .BR .PP @@ -458,6 +469,14 @@ Subsequent objects each represent performance data for one iteration .br .PP +.SS jsonl + +The jsonl output format is a data streaming variation of the JSON output format +described above with the same properties as the json\-seq output with the +difference that JSON data is separated only by an ASCII Line Feed character +(0x0a, LF). + + .SH EXAMPLES To start hyptop with the "sys_list" window in interactive mode, enter: .br diff --git a/hyptop/hyptop.c b/hyptop/hyptop.c index 7b909588..b28e0c36 100644 --- a/hyptop/hyptop.c +++ b/hyptop/hyptop.c @@ -233,7 +233,7 @@ static void l_fmt_init(void) flags |= FMT_QUOTEALL; if (g.o.format == FMT_CSV || g.o.format_all) flags |= FMT_KEEPINVAL; - if (g.o.format == FMT_JSON || g.o.format == FMT_JSONSEQ) + if (util_fmt_is_json(g.o.format)) flags |= FMT_HANDLEINT; util_fmt_init(stdout, g.o.format, flags, 1); } diff --git a/hyptop/table.c b/hyptop/table.c index 554099a4..57cf0f3b 100644 --- a/hyptop/table.c +++ b/hyptop/table.c @@ -1037,7 +1037,7 @@ void table_fmt_start(void) { if (!g.o.format_specified) return; - if (g.o.format != FMT_JSONSEQ) + if (!util_fmt_is_json_stream(g.o.format)) util_fmt_obj_start(FMT_LIST, "hyptop"); } @@ -1045,7 +1045,7 @@ void table_fmt_end(void) { if (!g.o.format_specified) return; - if (g.o.format != FMT_JSONSEQ) + if (!util_fmt_is_json_stream(g.o.format)) util_fmt_obj_end(); /* hyptop[] */ }