MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / kg_node_json_roundtrip

Function kg_node_json_roundtrip

atomic-core/src/pristine/vault.rs:1121–1131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1119
1120 #[test]
1121 fn kg_node_json_roundtrip() {
1122 let node = KgNode::new(
1123 "file:src/main.rs",
1124 crate::kg::ontology::Class::File,
1125 "src/main.rs",
1126 "change_graph",
1127 );
1128 let json = serde_json::to_string(&node).unwrap();
1129 let decoded: KgNode = serde_json::from_str(&json).unwrap();
1130 assert_eq!(node, decoded);
1131 }
1132
1133 #[test]
1134 fn kg_node_skips_none_fields() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected