Skip to content

Instantly share code, notes, and snippets.

@BigBlueHat
Last active August 29, 2015 14:04
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 BigBlueHat/efff3e3c082ee900e503 to your computer and use it in GitHub Desktop.
Save BigBlueHat/efff3e3c082ee900e503 to your computer and use it in GitHub Desktop.
AnnotatorJS JSON Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://annotatorjs.org/schema.json#",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"annotator_schema_version": {
"type": "string",
"default": "v1.0"
},
"created": {
"type": "string"
},
"updated": {
"type": "string"
},
"text": {
"type": "string"
},
"quote": {
"type": "string"
},
"uri": {
"type": "string"
},
"ranges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"startOffset": {
"type": "integer",
"default": 0
},
"endOffset": {
"type": "integer"
}
},
"required": [
"start",
"end",
"startOffset",
"endOffset"
]
},
"required": [
"0"
]
},
"user": {
"type": "string"
},
"consumer": {
"type": "string"
},
"tags": {
"type": "array"
},
"permissions": {
"type": "object",
"properties": {
"read": {
"type": "array"
},
"admin": {
"type": "array"
},
"update": {
"type": "array"
},
"delete": {
"type": "array"
}
},
"required": [
"read",
"admin",
"update",
"delete"
]
}
},
"required": [
"id",
"annotator_schema_version",
"created",
"updated",
"text",
"quote",
"uri",
"ranges",
"user",
"consumer",
"tags",
"permissions"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment