diff --git a/lib/src/sparql/json_results.rs b/lib/src/sparql/json_results.rs index 3915a42a..c4041485 100644 --- a/lib/src/sparql/json_results.rs +++ b/lib/src/sparql/json_results.rs @@ -51,7 +51,7 @@ pub fn write_json_results(results: QueryResult<'_>, mut sink: W) -> Re } Term::BlankNode(bnode) => { sink.write_all(b":{\"type\":\"bnode\",\"value\":")?; - write!(sink, "{}", bnode.as_str())?; + write_escaped_json_string(bnode.as_str(), &mut sink)?; sink.write_all(b"}")?; } Term::Literal(literal) => {