1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// src/export/json.rs — JSON Streaming Exporter
//
// Writes StatsSnapshot entries as newline-delimited JSON (NDJSON) to stdout.
// This format is ideal for piping into tools like `jq`, `grep`, logging
// aggregators, or any streaming JSON consumer.
//
// Example output line:
// {"target":"8.8.8.8","sample_count":60,"loss_pct":0.0,"rtt_p50_us":12340,...}
use crateStatsSnapshot;
use Result;
use ;
/// Exporter that writes StatsSnapshots as NDJSON to stdout.