Skip to content

Instantly share code, notes, and snippets.

@fabianvf
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabianvf/8c9f01628bb2a429435a to your computer and use it in GitHub Desktop.
Save fabianvf/8c9f01628bb2a429435a to your computer and use it in GitHub Desktop.
json schema
{
"collectionTime": "2014-03-14T00:00:00Z",
"creationDate": "2014-09-12",
"creator": [
{
"name": "Roger Danger Ebert",
"sameAs": [
"/wrgr2/",
"DAE"
],
"familyName": "Ebert",
"givenName": "Roger",
"additionalName": "Danger",
"email": "roger@example.com",
"affiliation": "University of Movies"
},
{
"name": "Roger Madness Ebert",
"sameAs": [
"/wrgr3/",
"DAE4"
],
"familyName": "Ebert",
"givenName": "Roger",
"additionalName": "Madness",
"email": "rogermadness@example.com",
"affiliation": "University of Movies"
}
],
"description": "This is a thing",
"directLink": "www.example.com/stuff",
"releaseDate": "2014-12-12",
"freeToRead": {
"startDate": "2014-09-12",
"endDate": "2014-10-12"
},
"licenseRef": [
{
"uri": "www.mitlicense.com",
"startDate": "2014-10-12",
"endDate": "2014-11-12"
}
],
"notificationLink": "http://myresearch.com/",
"publisher": "Roger Ebert Inc",
"raw": "http://osf.io/raw/thisdocument/",
"relation": [
"http://otherresearch.com/this"
],
"resourceIdentifier": "http://landingpage.com/this",
"revisionTime": "2014-02-12T15:25:02Z",
"source": "Big government",
"sponsorship": [
{
"award": {
"awardName": "Participation",
"awardIdentifier": "http://example.com"
},
"sponsor": {
"sponsorName": "Orange",
"sponsorIdentifier": "http://example.com/orange"
}
}
],
"title": "Interesting research",
"journalArticleVersion": "AO",
"versionOfRecord": "http://example.com/this/now/"
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://share-research.org/schema",
"type": "object",
"properties": {
"collectionTime": {
"id": "http://share-research.org/schema/collectionTime",
"type": "string",
"format": "date-time"
},
"creationDate": {
"id": "http://share-research.org/schema/creationDate",
"type": "string",
"pattern": "[0-2]\\d\\d\\d-[0-1]\\d-[0-3]\\d"
},
"creator": {
"id": "http://share-research.org/schema/creator",
"type": "array",
"items": [
{
"id": "http://share-research.org/schema/creator",
"type": "object",
"properties": {
"name": {
"id": "http://share-research.org/schema/creator/name",
"type": "string"
},
"sameAs": {
"id": "http://share-research.org/schema/creator/sameAs",
"type": "array",
"items": [
{
"id": "http://share-research.org/schema/creator/sameAs",
"type": "string"
},
{
"id": "http://share-research.org/schema/creator/sameAs/1",
"type": "string"
}
]
},
"familyName": {
"id": "http://share-research.org/schema/creator/familyName",
"type": "string"
},
"givenName": {
"id": "http://share-research.org/schema/creator/givenName",
"type": "string"
},
"additionalName": {
"id": "http://share-research.org/schema/creator/additionalName",
"type": "string"
},
"email": {
"id": "http://share-research.org/schema/creator/email",
"type": "string"
},
"affiliation": {
"id": "http://share-research.org/schema/creator/affiliation",
"type": "string"
}
}
},
{
"id": "http://share-research.org/schema/creator/1",
"type": "object",
"properties": {
"name": {
"id": "http://share-research.org/schema/creator/1/name",
"type": "string"
},
"sameAs": {
"id": "http://share-research.org/schema/creator/1/sameAs",
"type": "array",
"items": [
{
"id": "http://share-research.org/schema/creator/1/sameAs",
"type": "string"
},
{
"id": "http://share-research.org/schema/creator/1/sameAs/1",
"type": "string"
}
]
},
"familyName": {
"id": "http://share-research.org/schema/creator/1/familyName",
"type": "string"
},
"givenName": {
"id": "http://share-research.org/schema/creator/1/givenName",
"type": "string"
},
"additionalName": {
"id": "http://share-research.org/schema/creator/1/additionalName",
"type": "string"
},
"email": {
"id": "http://share-research.org/schema/creator/1/email",
"type": "string"
},
"affiliation": {
"id": "http://share-research.org/schema/creator/1/affiliation",
"type": "string"
}
}
}
]
},
"description": {
"id": "http://share-research.org/schema/description",
"type": "string"
},
"directLink": {
"id": "http://share-research.org/schema/directLink",
"type": "string"
},
"releaseDate": {
"id": "http://share-research.org/schema/releaseDate",
"type": "string",
"pattern": "[0-2]\\d\\d\\d-[0-1]\\d-[0-3]\\d"
},
"freeToRead": {
"id": "http://share-research.org/schema/freeToRead",
"type": "object",
"properties": {
"startDate": {
"id": "http://share-research.org/schema/freeToRead/startDate",
"type": "string",
"pattern": "[0-2]\\d\\d\\d-[0-1]\\d-[0-3]\\d"
},
"endDate": {
"id": "http://share-research.org/schema/freeToRead/endDate",
"type": "string",
"pattern": "[0-2]\\d\\d\\d-[0-1]\\d-[0-3]\\d"
}
}
},
"licenseRef": {
"id": "http://share-research.org/schema/licenseRef",
"type": "array",
"items": {
"id": "http://share-research.org/schema/licenseRef",
"type": "object",
"properties": {
"uri": {
"id": "http://share-research.org/schema/licenseRef/uri",
"type": "string"
},
"startDate": {
"id": "http://share-research.org/schema/licenseRef/startDate",
"type": "string",
"pattern": "[0-2]\\d\\d\\d-[0-1]\\d-[0-3]\\d"
},
"endDate": {
"id": "http://share-research.org/schema/licenseRef/endDate",
"type": "string",
"pattern": "[0-2]\\d\\d\\d-[0-1]\\d-[0-3]\\d"
}
}
}
},
"notificationLink": {
"id": "http://share-research.org/schema/notificationLink",
"type": "string"
},
"publisher": {
"id": "http://share-research.org/schema/publisher",
"type": "string"
},
"raw": {
"id": "http://share-research.org/schema/raw",
"type": "string"
},
"relation": {
"id": "http://share-research.org/schema/relation",
"type": "array",
"items": {
"id": "http://share-research.org/schema/relation",
"type": "string"
}
},
"resourceIdentifier": {
"id": "http://share-research.org/schema/resourceIdentifier",
"type": "string"
},
"revisionTime": {
"id": "http://share-research.org/schema/revisionTime",
"type": "string",
"format": "date-time"
},
"source": {
"id": "http://share-research.org/schema/source",
"type": "string"
},
"sponsorship": {
"id": "http://share-research.org/schema/sponsorship",
"type": "array",
"items": {
"id": "http://share-research.org/schema/sponsorship",
"type": "object",
"properties": {
"award": {
"id": "http://share-research.org/schema/sponsorship/award",
"type": "object",
"properties": {
"awardName": {
"id": "http://share-research.org/schema/sponsorship/award/awardName",
"type": "string"
},
"awardIdentifier": {
"id": "http://share-research.org/schema/sponsorship/award/awardIdentifier",
"type": "string"
}
}
},
"sponsor": {
"id": "http://share-research.org/schema/sponsorship/sponsor",
"type": "object",
"properties": {
"sponsorName": {
"id": "http://share-research.org/schema/sponsorship/sponsor/sponsorName",
"type": "string"
},
"sponsorIdentifier": {
"id": "http://share-research.org/schema/sponsorship/sponsor/sponsorIdentifier",
"type": "string"
}
}
}
}
}
},
"title": {
"id": "http://share-research.org/schema/title",
"type": "string"
},
"journalArticleVersion": {
"id": "http://share-research.org/schema/journalArticleVersion",
"type": "string"
},
"versionOfRecord": {
"id": "http://share-research.org/schema/versionOfRecord",
"type": "string"
}
},
"required": [
"collectionTime",
"creator",
"directLink",
"releaseDate",
"notificationLink",
"raw",
"resourceIdentifier",
"source",
"title"
]
}
---
$schema: "http://json-schema.org/draft-04/schema#"
id: "http://share-research.org/schema"
type: "object"
properties:
collectionTime:
id: "http://share-research.org/schema/collectionTime"
type: "string"
format: "date-time"
creationDate:
$ref: "#/definitions/date"
creator:
id: "http://share-research.org/schema/creator"
type: "array"
items:
-
id: "http://share-research.org/schema/creator"
type: "object"
properties:
name:
id: "http://share-research.org/schema/creator/name"
type: "string"
sameAs:
id: "http://share-research.org/schema/creator/sameAs"
type: "array"
items:
-
id: "http://share-research.org/schema/creator/sameAs"
type: "string"
-
id: "http://share-research.org/schema/creator/sameAs/1"
type: "string"
familyName:
id: "http://share-research.org/schema/creator/familyName"
type: "string"
givenName:
id: "http://share-research.org/schema/creator/givenName"
type: "string"
additionalName:
id: "http://share-research.org/schema/creator/additionalName"
type: "string"
email:
id: "http://share-research.org/schema/creator/email"
type: "string"
affiliation:
id: "http://share-research.org/schema/creator/affiliation"
type: "string"
-
id: "http://share-research.org/schema/creator/1"
type: "object"
properties:
name:
id: "http://share-research.org/schema/creator/1/name"
type: "string"
sameAs:
id: "http://share-research.org/schema/creator/1/sameAs"
type: "array"
items:
-
id: "http://share-research.org/schema/creator/1/sameAs"
type: "string"
-
id: "http://share-research.org/schema/creator/1/sameAs/1"
type: "string"
familyName:
id: "http://share-research.org/schema/creator/1/familyName"
type: "string"
givenName:
id: "http://share-research.org/schema/creator/1/givenName"
type: "string"
additionalName:
id: "http://share-research.org/schema/creator/1/additionalName"
type: "string"
email:
id: "http://share-research.org/schema/creator/1/email"
type: "string"
affiliation:
id: "http://share-research.org/schema/creator/1/affiliation"
type: "string"
description:
id: "http://share-research.org/schema/description"
type: "string"
directLink:
id: "http://share-research.org/schema/directLink"
type: "string"
releaseDate:
$ref: "#/definitions/date"
freeToRead:
id: "http://share-research.org/schema/freeToRead"
type: "object"
properties:
startDate:
$ref: "#definitions/date"
endDate:
$ref: "#definitions/date"
licenseRef:
id: "http://share-research.org/schema/licenseRef"
type: "array"
items:
id: "http://share-research.org/schema/licenseRef"
type: "object"
properties:
uri:
id: "http://share-research.org/schema/licenseRef/uri"
type: "string"
startDate:
$ref: "#definitions/date"
endDate:
$ref: "#definitions/date"
notificationLink:
id: "http://share-research.org/schema/notificationLink"
type: "string"
publisher:
id: "http://share-research.org/schema/publisher"
type: "string"
raw:
id: "http://share-research.org/schema/raw"
type: "string"
relation:
id: "http://share-research.org/schema/relation"
type: "array"
items:
id: "http://share-research.org/schema/relation"
type: "string"
resourceIdentifier:
id: "http://share-research.org/schema/resourceIdentifier"
type: "string"
revisionTime:
id: "http://share-research.org/schema/revisionTime"
type: "string"
format: "date-time"
source:
id: "http://share-research.org/schema/source"
type: "string"
sponsorship:
id: "http://share-research.org/schema/sponsorship"
type: "array"
items:
id: "http://share-research.org/schema/sponsorship"
type: "object"
properties:
award:
id: "http://share-research.org/schema/sponsorship/award"
type: "object"
properties:
awardName:
id: "http://share-research.org/schema/sponsorship/award/awardName"
type: "string"
awardIdentifier:
id: "http://share-research.org/schema/sponsorship/award/awardIdentifier"
type: "string"
sponsor:
id: "http://share-research.org/schema/sponsorship/sponsor"
type: "object"
properties:
sponsorName:
id: "http://share-research.org/schema/sponsorship/sponsor/sponsorName"
type: "string"
sponsorIdentifier:
id: "http://share-research.org/schema/sponsorship/sponsor/sponsorIdentifier"
type: "string"
title:
id: "http://share-research.org/schema/title"
type: "string"
journalArticleVersion:
id: "http://share-research.org/schema/journalArticleVersion"
type: "string"
versionOfRecord:
id: "http://share-research.org/schema/versionOfRecord"
type: "string"
required:
- "collectionTime"
- "creator"
- "directLink"
- "releaseDate"
- "notificationLink"
- "raw"
- "resourceIdentifier"
- "source"
- "title"
definitions:
date:
id: "http://share-research.org/schema/date/"
type: "string"
pattern: "[0-2]\\d\\d\\d-[0-1]\\d-[0-3]\\d"
http://json-schema-validator.herokuapp.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment