Skip to content

@id is numeric with @base : not processed by several JSON-LD engines: is it legal? #742

Description

@jmvanel

"taxonKey" is an @id and it is numeric.
It is associated with a @base.
json

{
  "gbifID":"1258202889",
  "protocol": "DWC_ARCHIVE",
  "basisOfRecord": "PRESERVED_SPECIMEN",
  "taxonKey": 7310533
}

jsonld @context

{ "@context": {
  "@vocab" : "http://rs.tdwg.org/dwc/terms/",
  "@base" : "https://api.gbif.org/v1/occurrence/",

  "dwciri": "http://rs.tdwg.org/dwc/iri/",
  "gbifID": "@id",
  "taxonKey":{
    "@context": {
      "@base" : "https://api.gbif.org/v1/species/"
    },
    "@id": "dwciri:toTaxon", "@type": "@id"
  }
} }

Expected:

<https://api.gbif.org/v1/occurrence/1258202889>
        <http://rs.tdwg.org/dwc/iri/toTaxon>
                <https://api.gbif.org/v1/species/7310533> .

Current output

<https://api.gbif.org/v1/occurrence/1258202889>
        <http://rs.tdwg.org/dwc/iri/toTaxon>
                7310533 .

If numeric @id's are legal, it should be mentioned the specification, no ?
There is a problem with round tripping back to JSON here, but in my use case I only care about getting RDF triples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions