From 680cadd3242a0736ab69e6acbda72d3e556673f4 Mon Sep 17 00:00:00 2001 From: James McLaughlin Date: Mon, 12 Aug 2024 18:21:46 +0100 Subject: [PATCH] escape ancestor iris in ols ingest --- 01_ingest/grebi_ingest_ols/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/01_ingest/grebi_ingest_ols/src/main.rs b/01_ingest/grebi_ingest_ols/src/main.rs index 56b98fb..9df470a 100644 --- a/01_ingest/grebi_ingest_ols/src/main.rs +++ b/01_ingest/grebi_ingest_ols/src/main.rs @@ -216,8 +216,9 @@ fn read_entities(json: &mut JsonStreamReader>>, output_n if obj.contains_key("ols:directAncestor") { for ancestor in get_string_values(obj.get("ols:directAncestor").unwrap()) { if type_superclasses.contains(ancestor) { - output_nodes.write_all(r#","#.as_bytes()).unwrap(); - output_nodes.write_all(ancestor.to_string().as_bytes()).unwrap(); + output_nodes.write_all(r#",""#.as_bytes()).unwrap(); + write_escaped_string(&ancestor.as_bytes(), output_nodes); + output_nodes.write_all(r#"""#.as_bytes()).unwrap(); } } }