Skip to content

Definition of dcat:spatialResolutionInMeters incompatible/problematic with JSON-LD #1536

@jakubklimek

Description

@jakubklimek

There is a technical issue with the definition of dcat:spatialResolutionInMeters when used with JSON-LD.
Specifically, the issue is the range being xsd:decimal.

In JSON-LD, xsd:decimal is not supported for numbers, see the note in the specification. Therefore, when in JSON this number is actually a JSON number, not JSON string, even if the JSON-LD context specifies the datatype to be explicitly xsd:decimal, the number is treated as xsd:double, leading to conversions like 1.2E1 instead of 12 when loading JSON-LD as RDF, in turn leading to invalid xsd:decimal RDF literal "1.2E1"^^xsd:decimal. This can be seen e.g. in JSON-LD playground.

Possible solutions:

  1. We change the datatype to xsd:integer or xsd:double, which is a breaking change
  2. We explicitly mention, that JSON-LD has this issue, and the property data needs to be represented as JSON String, not JSON Number

Metadata

Metadata

Assignees

Labels

dcatdue for closingIssue that is going to be closed if there are no objection within 6 daysfeedbackIssues stemming from external feedback to the WGspatial-resolution

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions