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

Method to_json

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

Serialize to a `serde_json::Value`. Returns the full OCSF JSON object, or an error if serialization fails.

(&self)

Source from the content-addressed store, hash-verified

10 ///
11 /// Returns the full OCSF JSON object, or an error if serialization fails.
12 pub fn to_json(&self) -> Result<serde_json::Value, serde_json::Error> {
13 serde_json::to_value(self)
14 }
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> {

Calls

no outgoing calls