On 08/06/18 18:09, Philip Coates wrote:
Hello,
I’ve run into a situation where it looks like AWS Neptune (possibly other
stores too) is returning both xml:lang and the datatype for String literals.
It turns out that Jena doesn’t like this in JSON SPARQL results (it's fine
with XML, cf JENA-1077) - QueryEngineHTTP pulls the results through a JSON
processor, org.apache.jena.riot.resultset.rw.ResultSetReaderJSON, and this
throws an error internally when it tries to process the output, e.g.:
{
"xml:lang" : "en" ,
"datatype" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString" ,
"type" : "literal" ,
"value" : "phototaxis"
}
This can easily be worked around by setting the content-type for the select
results, but it seems like a bug that it doesn't work the same with every
content type.
Do they do the same for xsd:string?
I couldn't find many other references to this sort of issue in the archives
or documentation, so I was proposing to raise a bug, and create a simple
patch for this to allow it for the string and langString datatype in JSON.
Please go ahead with the ticket and PR.
It isn't supposed to include datatype for rdf:langString nor xsd:string
though the main text for that is in the main RDF doc where is says in
general don't include them. Jena ought to be lax about it and certainly
consistent.
Thanks in advance,
Andy
Does anyone have any thoughts or caveats?
*Philip Coates*
*Director*
email: [email protected]
tel: +44 (0)7711 818384
Registered in England and Wales. Company number: 08688966.
Registered office: First Floor, Telecom House, 125-135 Preston Road,
Brighton, England, BN1 6AF
<https://maps.google.com/?q=125-135+Preston+Road,+Brighton,+England,+BN1+6AF&entry=gmail&source=g>