invalid JSON query output with newlines in literal values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
rdflib |
New
|
Undecided
|
Unassigned |
Bug Description
Input data:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE owl [
<!ENTITY rdf 'http://
<!ENTITY xsd 'http://
]>
<rdf:RDF xmlns:rdf="&rdf;"
>
<rdf:Description rdf:about="http://
<rdf:value>This
is
some
multi-line
text
literal</rdf:value>
</rdf:Description>
</rdf:RDF>
Query:
PREFIX rdf: <http://
SELECT ?value
WHERE {
?bla rdf:value ?value ;
}
This returns invalid JSON looking something like this:
{ "head" : { "vars" : [ "value" ] },
"results" : { "ordered" : false, "distinct" : false, "bindings" : [ {
is
some
multi-line
text
literal"}}]}}
The newline characters should be escaped.