geojson / geojson-ld

GeoJSON in JSON-LD contexts
Other
131 stars 13 forks source link

Make `type` an alias for `rdf:type`, `id` for keyword `@id` #21

Closed sgillies closed 10 years ago

sgillies commented 10 years ago

As discussed in #7, aliases makes it easier to get from RDF to the GeoJSON (using "compact" JSON-LD with aliases).

dr-shorthair commented 10 years ago

In Turtle "a" is an alias for rdf:type. So

a my:City . is equivalent to rdf:type my:City .
elf-pavlik commented 10 years ago

one could simply do

{
  "@context": {
    "type": "@type"
  }
}

i would stay careful with doing "id": "@id" since we would need to require use of valid IRIs for all id s!