MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / to_json_line

Method to_json_line

crates/openshell-ocsf/src/format/jsonl.rs:17–21  ·  view source on GitHub ↗

Serialize as a single JSONL line (no pretty-printing, trailing newline).

(&self)

Source from the content-addressed store, hash-verified

15
16 /// Serialize as a single JSONL line (no pretty-printing, trailing newline).
17 pub fn to_json_line(&self) -> Result<String, serde_json::Error> {
18 let mut line = serde_json::to_string(self)?;
19 line.push('\n');
20 Ok(line)
21 }
22}
23
24#[cfg(test)]

Callers 2

on_eventMethod · 0.80
test_to_json_line_formatFunction · 0.80

Calls 1

pushMethod · 0.80

Tested by 1

test_to_json_line_formatFunction · 0.64