Server.Java icon indicating copy to clipboard operation
Server.Java copied to clipboard

Incorrect JSON-LD datatype for hydra:totalItems

Open rubensworks opened this issue 6 years ago • 0 comments

When fragments are retrieved in JSON-LD, it looks like the hydra:totalItems values are being returned as strings, instead of a number such as xsd:integer. This does work properly when serialized as Turtle though.

I assume this is because the total item count is typically very large (larger than max int), which makes something internal inside the JSON-LD serialized not accept xsd:integer.

A solution may be to use the datatype xsd:long instead.

Example: curl -H'Accept: application/ld+json' https://query.wikidata.org/bigdata/ldf

rubensworks avatar Jun 11 '19 08:06 rubensworks