You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Research Topic

  • Assumption: Whatever schemas our WG comes up with for resources, they will need to be locally extensible.

  • Questions: Is it possible to design APIs and Resource representations so that resource properties the recipient doesn’t know about can be ignored/skipped? If so, how?

Leveraging JSON-LD

https://lists.w3.org/Archives/Public/public-schemaorg/2016Jan/0004.html

...I'd also like to expose a JSON-LD representation of my resources. JSON-LD is fine with multiple vocabularies and you can in fact 'ignore' properties by not defining them in the @context. This means this is my source (note that I shortened the polygon value for readability):

{
"@context": {
"geo": "http://schema.org/geo",
"polygon": "http://schema.org/polygon"
},
"@type": "http://schema.org/Place",
"ID": 1,
"MUNICIPALITY": "Leeuwarden",
"WATER": "NO",
"geo": {
"@type": "http://schema.org/GeoShape",
"polygon": "53.24330130 ... 2536921"
}
}

From a Linked Data and JSON-LD point of view this is completely correct. The properties ID, MUNICIPALITY and WATER aren't mapped in the @context so the parsers ignore this.

  • No labels