Dear list,
As this is my first post, let me introduce myself: I am a Norwegian developer who is also a member of the organization IPTC. We are currently working on a standard for sports data. Because we have been working on the XML standard for years, we have decided to make the JSON-standard as close to the XML-standard as possible.
This may not be the right way to do it, but as we see it there are benefits:
1) We can reuse documentation
2) Developers of applications delivering sports data using our standards can reuse code (I've done this in a C# application I developed a few years back).
We have created a JSON-schema and we do think it is quite good, just that it does only validate the first level - or so it seems.
We are also trying to figure out how to do something like the following:
In the structure at the end of this post we have a sportsContent - we want this to be mandatory. Then we have a tournament and below this one the tournamentMetadata (TM). At the same level we have tournamentDivision (TD). TD may occur so we cannot make it mandatory, but if it is present we would like the schema to validate it and the structure following.
Our schema can be found here:
Looking forward to some feedback from the group/list.
Best regards,
Trond
{
"sportsContent": {
"tournament": {
"class": "johan",
"tournamentMetadata": {
"Status": "speventstatus:post-event",
"StartDateTime": "2015-03-08",
"VenueType": "spsitestyle:outdoor",
"SurfaceType": "vendst:snow",
"name": {
"full": "Vasaloppet 2015"
},
"Site": {
"SiteMetadata": {
"HomeLocation": {
"POIDetails": {
"Address": {
"Locality": {
"name": {
"full": "Mora"
}
},
"Country": {
"name": {
"full": "Sverige"
}
}
}
}
}
}
}
},
"tournamentDivision" : {
"tournamentDivisionMetadata": {
"name": {
"full": "Division name"
}
}
}
}
}
}