Object Reference¶
Class Definitions
Annotation¶
An Annotation is a metadata item which describes an ancillary note made on an object.
{
"id": "8537e8d6-758c-439c-af10-f60dd693044a",
"parent" : "9db20a5b-cece-45be-96a0-c31ecedb721a",
"highlight": [
[3,6],
[7,9]
],
"contributor": "8e0cd67f-f9da-46b8-98b9-16169893b439",
"created" : "2004-02-12T15:19:21+00:00",
"content" : {
"en" : "Does it have to be dark?"
},
"color" : "blue",
"meta" : {
"property": "value"
}
}
Property | Description Type | Required | |
---|---|---|---|
color | Label of a Color object specifying what colour to display. | string | No |
content | A Content object with the text of the note. | object | Yes |
contributor | The ID of the Author or Contributor who wrote the text. | string | Yes |
created | ISO 8601 timezone date the note was made. | string | Yes |
highlight | String character sequences to visually highlight (first/last chars). | array[int] | No |
id | Unique identifier for the annotation. | string | Yes |
meta | Arbitrary object of custom properties. | object | No |
parent | Parent identifier of the object being annotated. | string | Yes |
Author¶
An Author describes an original writer of the content.
{
"id": "01979fca-6ac3-479e-9f33-d89498836eb1",
"given" : "Frank",
"family": "Darabont",
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
family | Last/family/surname name of the author. | string | Yes |
given | First/given name of the author. | string | Yes |
id | Unique identifier for the author. | string | Yes |
meta | Arbitrary Meta object of custom properties. | object | No |
Note
An Author is defined as the originator of the content which has being written, which may be reviewed or augmented by a Contributor.
Bookmark¶
A Bookmark describes a shortcut child Element object within a Scene object.
{
"id": "8537e8d6-758c-439c-af10-f60dd693044a",
"parent" : "9db20a5b-cece-45be-96a0-c31ecedb721a",
"scene": 4,
"type": "action",
"element": 2,
"title": {
"en": "Start"
},
"description": {
"en": ""
}
}
Property | Description | Type | Required |
---|---|---|---|
element | Index of the Element object within the scene. | int | Yes |
description | A Content object describing the bookmark. | object | Yes |
scene | Index of the Scene element. | int | Yes |
parent | Parent identifier of the object being bookmarked. | string | Yes |
title | A Title object with the name of the bookmark. | object | Yes |
type | The type property of the scene Element. | string | No |
Note
The index of a scene or element is analogous to its placement in an array (i.e. the array index). In the example above, the bookmark corresponds to the third element (action) in the fifth scene.
Color¶
A Color is a human-understandable description of a color which the end-user’s presentation UI should use in its display in order to reproduce the same (e.g. HTML colour value).
{
"title" : "blue",
"rgb" : [0,0,255],
"hex" : "#0000FF",
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
hex | Friendly HTML-reference code of the color. | string | No |
meta | Arbitrary Meta object of custom properties. | object | No |
rgb | RGB reference numbers of the color. | array [int 0-255] | Yes |
title | A sluggable, human-understandable name for the color. | string | Yes |
Content¶
A Content block describes a generic piece of text in multiple languages.
{
"en": "Some text in English",
"fr": "Quelques textes en français"
}
Property | Description | Type | Required |
---|---|---|---|
[lang] | Text in the main language specified in the container. | string | Yes |
[iso] | Text in the iso language code specified. | string | No |
Contributor¶
A Contributor describes any third party who has contributed artistically to the content, such as an editor, director, or script doctor.
{
"id": "8e0cd67f-f9da-46b8-98b9-16169893b439",
"given" : "John",
"family": "Doe",
"roles" : ["doctor", "editor"],
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
family | Last/family/surname name of the contributor. | string | Yes |
given | First/given name of the contributor. | string | Yes |
id | Unique identifier for the contributor. | string | Yes |
meta | Arbitrary Meta object of custom properties. | object | No |
roles | Sluggable list of system roles/groups the contributor belongs to. | array [string] | No |
Note
A Contributor is defined as a person reviewing, augmenting, or enhancing content originated by an Author.
Cover¶
A Cover describes how the front page of the screenplay should be presented.
{
"title" : {
"en": "THE SHAWSHANK REDEMPTION",
"es-mx": "Sueño de fuga"
},
"authors" : ["01979fca-6ac3-479e-9f33-d89498836eb1"],
"meta" : {
"property": "value"
},
"derivations" : ["3608b093-1280-4834-9ea4-d9d2b8d711a6"],
"additional" : {
"en" : "Based upon the story Rita Hayworth and Shawshank Redemption by Stephen King"
}
}
Property | Description | Type | Required |
---|---|---|---|
authors | References to the author IDs defined in the parent container. | array[string] | Yes |
additional | A Content object with arbitrary text. | string | No |
derivations | A list of derivation IDs to include in the cover. | array[string] | No |
meta | Arbitrary Meta object of custom properties. | object | No |
templates | List of internal templates a GUI host should apply to the content | array[string] | No |
title | A Title object with the name of the work. | object | Yes |
Derivation¶
A Derivation describes an original artistic work used as a source for the content.
{
"id" : "3608b093-1280-4834-9ea4-d9d2b8d711a6",
"type": "novella",
"title": {
"en": "Rita Hayworth and Shawshank Redemption"
},
"meta" : {
"isbn": "978-0896214408",
"comments" : "Based upon the story Rita Hayworth and Shawshank Redemption by Stephen King"
}
}
Property | Description | Type | Required |
---|---|---|---|
id | Unique identifier for the contributor. | string | Yes |
meta | Arbitrary Meta object of custom properties. | object | No |
title | A Title object describing the original work. | object | Yes |
type | A sluggable, human-understandable name for the work genre/group. | string | No |
Encryption¶
Encryption describes the means (protocol, cipher etc) used to encrypt the content. Its purpose to enable the end-user’s presentation UI to quickly recognise the data and load the appropriate libraries required to decode the content when the appropriate credentials are supplied.
{
"cipher" : "aes-256-ctr",
"hash" : "sha256",
"encoding" : "hex",
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
cipher | Cipher the content is encrypted with. | string | Yes |
encoding | Type of encoding used for the output. | object | Yes |
hash | Hash type the content is encrypted with. | string | Yes |
meta | Arbitrary Meta object of custom properties. | object | No |
Note
Valid ciphers and hashes are derived from cryptojs using console.log(require(‘crypto’).getCiphers()).
Header¶
A Header describes how the footer bar/ribbon of the screenplay should be presented.
{
"cover" : true,
"display" : true,
"start": 1,
"omit" : [0],
"content" : {
"en" : "THE SHAWSHANK REDEMPTION by Frank Darabont"
},
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
cover | Whether or not to show the header on the cover page. | boolean | Mo |
content | A Content object specifying the text. | object | No |
display | Whether or not to display the header at all. | boolean | No |
meta | Arbitrary Meta object of custom properties. | object | No |
omit | A list of scenes or page indexes where a header should not be shown. | array[int] | No |
start | A page or scene index where a header should start to be shown. | int | No |
Heading¶
A Heading describes the setting and context of a scene.
{
"numbering" : 1,
"page" : 1,
"context": {
"en" : "INT"
},
"setting": {
"en" : "CABIN"
},
"sequence": {
"en" : "NIGHT"
},
"description" : {
"en" : "Notes that appear in Card View go here."
},
"meta": {
"example": "custom property data here"
}
}
Property | Description | Type | Required |
---|---|---|---|
context | A Content object specifying INT/EXT/POV etc. | object | Yes |
description | A Content object detailing the scene. | object | No |
meta | An arbitrary Meta object for providing custom values. | object | No |
numbering | Production scene number to display. | int | No |
page | Page number the scene should appear on. | int | No |
sequence | A Content object specifying DAY/NIGHT etc. | string | Yes |
setting | A Content object specifying the location of the scene. | string | Yes |
Note
Valid values for a scene context are I/E, INT, EXT, POV.
Note
Valid values for a scene sequence (time) are DAY, NIGHT, DAWN, DUSK, LATER, MOMENTS LATER, CONTINUOUS, MORNING, AFTERNOON, EVENING, THE NEXT DAY.
License¶
A License describes of the copyright under which the content is protected and the means to check its provisions and/or limitations.
{
"identifier": "CC-BY-NC-ND-4.0",
"ref": "https://spdx.org/licenses/",
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
identifier | Sluggable label of the copyright schema. | string | Yes |
meta | Arbitrary object of custom properties. | object | No |
ref | Internet reference for the full definition of the copyright terms. | object | Yes |
Note
A valid license is any identifier from the SPDX list: https://spdx.org/licenses/
Meta¶
A Meta object describes a generic or custom set of properties and their values.
{
"something": "Anything you want",
}
Property | Description | Type | Required |
---|---|---|---|
[key] | Any key name. | string | No |
[value] | Any value of any type. | mixed | No |
Registration¶
A Registration describes where the content has been officially submitted to for copyright protection.
{
"authority": "WGA",
"identifier" : "4847494058",
"created" : "2004-02-12T15:19:21+00:00",
"modified" : "2004-02-12T15:19:21+00:00",
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
created | ISO 8601 timezone date the registration was made. | string | Yes |
authority | Sluggable label of registration provider/host. | string | Yes |
identifier | Sluggable label of registration ID. | string | Yes |
meta | Arbitrary Meta object of custom properties. | object | No |
modified | ISO 8601 timezone date the registration was last updated. | string | No |
ref | Internet reference for the full definition of the copyright terms. | object | Yes |
Revision¶
A Revision describes when a parent container or sub-section of content was changed.
{
"id": "8537e8d6-758c-439c-af10-f60dd693044a",
"parent" : "9db20a5b-cece-45be-96a0-c31ecedb721a",
"index": 0,
"authors" : ["01979fca-6ac3-479e-9f33-d89498836eb1"],
"version": "draft",
"created" : "2004-02-12T15:19:21+00:00",
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
authors | List of author IDs who created the revision. | array[string] | Yes |
created | ISO 8601 timezone date the revision was recorded. | string | Yes |
index | Internal index of the revision. | int | Yes |
meta | Arbitrary Meta object of custom properties. | object | No |
parent | Parent identifier of the object being revised. | string | Yes |
version | Human-readable type of revision. | string | No |
Status¶
An Status describes a script revision color.
{
"color": "blue",
"round" : 1,
"updated" : "2004-02-12T15:19:21+00:00",
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
color | Color code of the revision (see note) | string | Yes |
round | Which round of revisions the work is on. | int | Yes |
meta | Arbitrary Meta object of custom properties. | object | No |
updated | ISO 8601 timezone date the revision was last updated. | string | Yes |
Industry standard revision colors:
- white
- blue
- pink
- yellow
- green
- goldenrod
- buff
- salmon
- cherry
Style¶
Similar to a CSS declaration, a Style defines a reusable visual rule a GUI should apply to the content of one or more scene elements throughout the entire document.
{
"id" : "courier-12",
"default": true,
"content" : "font-family: courier; font-size: 12px;",
"meta" : {
"property": "value"
}
}
Property | Description | Type | Required |
---|---|---|---|
id | Unique sluggable identifier for referencing within the document. | string | Yes |
content | Arbitrary text with instructions for the presentation rule. | string | Yes |
default | Whether or not the style should be the default presentation. | boolean | No |
meta | Arbitrary Meta object of custom properties. | object | No |
Warning
ScreenJSON is not a presentation format. A Style object is used by the GUI host to store the data it needs to present the document content, which it defines itself. How a screenplay appears is up to the host, this object allows it to store the data of the instruction.
Title¶
A Title describes the name of the artistic work in one or more languages.
{
"en": "THE SHAWSHANK REDEMPTION",
"es-mx": "Sueño de fuga"
}
Property | Description | Type | Required |
---|---|---|---|
[lang] | Name of the work in the file’s main language. | string | Yes |
[iso] | Name of the work in the iso language code specified. | string | No |