Closed eroux closed 6 years ago
Implemented solution 3 in commit df35a6a - prefixes still need to be added
Thanks, not sure we really need to add prefixes, but the datatypes are missing from the literal fields, they appear in some SPARQL results like the following:
{
"head": {
"vars": [ "p" ]
} ,
"results": {
"bindings": [
{
"p": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }
} ,
Ok. added Literal datatypes URI in json Results
Looking at the code I think it will output
{
"p": { "type": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }
} ,
instead of:
{
"p": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }
} ,
? If so, I think it shouldn't, I see some virtue in using the exact same format as the SPARQL query...
Ok ! Implemented in commit f41a720
The current json output looks like:
but what an API consumer wants is the URI of the resource, not an html link. So we have several solutions.
Solution 1
A small change:
(not sure about the
<...>
)Solution 2
add prefixes, as in:
Solution 3
just transmit the SPARQL result, which looks just fine:
I think Solution 3 is the most solid one.