Apparently I'm either not describing the case clearly - or no one is actually reading the full thread to understand the issue. :(
On Friday, March 29, 2013 9:16:14 AM UTC-7, Austin Wright wrote:
RDFa is just a particular method of encoding RDF data into a DOM like HTML, so what do you mean exactly?
In my understanding,
schema.org is an RDF vocabulary, which has little to do with JSON (unless perhaps you're also encoding the RDF as JSON-LD). Do you have a specific example of JSON data that you're trying to write a schema for?
Correct - the vocabulary isn't really tied to any particular encoding, per say - however most of the time, it's encoded as microdata, embedded into an HTML DOM, which is then used by major search engines to spider websites and index them for searching. My use case is slightly different - we aren't embedding anything into a DOM as we need the data portable for import into different solutions for a variety indexing purposes - including building of a graph database which may be used to discover related objects.
The soon to be released Schema.org V1.0, contains a new vocabulary extension - LRMI (Learning Resource Metadata Initiative); which adds a couple new Object types and additional properties to the existing CreativeWork object - which are really the core pieces I'm interested in.
Here's a Schema.org example record encoded in JSON using the algorithm described in HTML Microdata:
{
"items": [{
"id": "urn:www.khanacademy.org:node_slug:e/area_of_a_circle",
"properties": {
"name": ["Area of a circle"],
"author": [{
"properties": {
"name": ["Omar Rizwan"]
}
}],
"dateCreated": ["2012-04-13T23:13:03Z"],
"educationalAlignment": [{
"id": "urn:corestandards.org:guid:8111E58EA0054B8C8DE2CF7AA27F2FD8",
"properties": {
"alignmentType": ["teaches"],
"educationalFramework": ["Common Core State Standards"],
"targetName": ["CCSS.Math.Content.7.G.B.4"],
"targetDescription": ["Know the formulas for the area and circumference of a circle and use them to solve problems; give an informal derivation of the relationship between the circumference and area of a circle."],
}
}],
"learningResourceType": ["exercise"]
}
}]
}
For the most part, I have a JSON Schema that covers this. DONE.
As I'm trying to cover the entire Schema.org vocabulary, there's one edge condition that I'm not sure how to approach - which is what is described in Schema as an instance.
The example I gave was this:
{
"items": [
{
"properties": {
"audience": [
{
"properties": {
"code": [
{
"properties": {
"codeValue": ["ABC123"],
"codingSystem": ["ICD-10"]
}
}
]
}
}
]
}
}
but an equally permissible expression for a Clinician as the audience, noting that it doesn't provide the same level of detail, is:
{
"items": [
{
"properties": {
I'm just trying to figure out how to define the JSON Schema portion for this seemingly unusual condition.
After tinkering a bit... does this seem the right way for this?
"properties": {
"type": {
"items": {
},
"type": "array"
},
"id": {
"$ref": "#definitions/Text"
},
"properties": {
"type": "object"