##// END OF EJS Templates
Include version maximum of 4
Include version maximum of 4

File last commit:

r16898:dc5a3eaf
r16898:dc5a3eaf
Show More
v4.withref.json
324 lines | 11.9 KiB | application/json | JsonLexer
{
"$schema": "http://json-schema.org/draft-03/schema#",
"description": "IPython Notebook v4.0 JSON schema.",
"type": "object",
"additionalProperties": false,
"properties": {
"metadata": {
"description": "Notebook root-level metadata.",
"type": "object",
"required": true,
"additionalProperties": true,
"properties": {
"language": {
"description": "Language of the notebook's kernel.",
"type": "string",
"required": true
},
"kernel_info": {
"description": "Other kernel information, to be determined.",
"type": "object",
"required": true,
"additionalProperties": true
},
"signature": {
"description": "Hash of the notebook.",
"type": "string",
"required": false
}
}
},
"nbformat_minor": {
"description": "Notebook format (minor number). Incremented for slight changes to the notebook format.",
"type": "integer",
"required": true,
"minimum": 0
},
"nbformat": {
"description": "Notebook format (major number). Incremented between backwards incompatible changes to the notebook format.",
"type": "integer",
"required": true,
"minimum": 4,
"maximum": 4
},
"orig_nbformat": {
"description": "Original notebook format (major number) before converting the notebook between versions.",
"type": "integer",
"required": false,
"minimum": 1
},
"cells": {
"description": "Array of cells of the current notebook.",
"type": "array",
"required": true,
"items": {
"type": [
{"$ref": "/definitions/raw_cell"},
{"$ref": "/definitions/markdown_cell"},
{"$ref": "/definitions/heading_cell"},
{"$ref": "/definitions/code_cell"}
]
}
}
},
"definitions": {
"raw_cell": {
"description": "Notebook raw nbconvert cell.",
"type": "object",
"additionalProperties": false,
"properties": {
"cell_type": {
"description": "String identifying the type of cell.",
"enum": ["raw"],
"required": true
},
"metadata": {
"description": "Cell-level metadata.",
"type": "object",
"required": true,
"additionalProperties": true,
"properties": {
"format": {
"description": "Raw cell metadata format for nbconvert.",
"type": "string",
"required": false
}
}
},
"source": {
"description": "Contents of the cell, represented as an array of lines.",
"type": "array",
"required": true,
"items": {"type": "string"}
}
}
},
"markdown_cell": {
"description": "Notebook markdown cell.",
"type": "object",
"additionalProperties": false,
"properties": {
"cell_type": {
"description": "String identifying the type of cell.",
"enum": ["markdown"],
"required": true
},
"metadata": {
"description": "Cell-level metadata.",
"type": "object",
"required": true,
"additionalProperties": true
},
"source": {
"description": "Contents of the cell, represented as an array of lines.",
"type": "array",
"required": true,
"items": {"type": "string"}
}
}
},
"heading_cell": {
"description": "Notebook heading cell.",
"type": "object",
"additionalProperties": false,
"properties": {
"cell_type": {
"description": "String identifying the type of cell.",
"enum": ["heading"],
"required": true
},
"metadata": {
"description": "Cell-level metadata.",
"type": "object",
"required": true,
"additionalProperties": true
},
"source": {
"description": "Contents of the cell, represented as an array of lines.",
"type": "array",
"required": true,
"items": {"type": "string"}
},
"level": {
"description": "Level of heading cells.",
"type": "integer",
"required": true,
"minimum": 1,
"maximum": 6
}
}
},
"code_cell": {
"description": "Notebook code cell.",
"type": "object",
"additionalProperties": false,
"properties": {
"cell_type": {
"description": "String identifying the type of cell.",
"enum": ["code"],
"required": true
},
"metadata": {
"description": "Cell-level metadata.",
"type": "object",
"required": true,
"additionalProperties": true,
"properties": {
"collapsed": {
"description": "Whether the cell is collapsed/expanded.",
"type": "boolean",
"required": true
},
"autoscroll": {
"description": "Whether the cell's output should autoscroll.",
"type": "boolean",
"required": true
}
}
},
"source": {
"description": "Contents of the cell, represented as an array of lines.",
"type": "array",
"required": true,
"items": {"type": "string"}
},
"outputs": {
"description": "Execution, display, or stream outputs.",
"type": "array",
"required": true,
"items": {
"type": [
{"$ref": "/definitions/execute_output"},
{"$ref": "/definitions/stream_output"},
{"$ref": "/definitions/error_output"}
]
}
},
"prompt_number": {
"description": "The code cell's prompt number. Will be null if the cell has not been run.",
"type": ["integer", "null"],
"required": true,
"minimum": 0
}
}
},
"execute_output": {
"description": "Result of executing a code cell.",
"type": "object",
"additionalProperties": false,
"properties": {
"output_type": {
"description": "Type of cell output.",
"enum": ["execute_output", "display_data"],
"required": true
},
"metadata": {
"description": "Cell output metadata.",
"type": "object",
"required": true,
"additionalProperties": true
},
"prompt_number": {
"description": "The code cell's prompt number. Will be null if the cell has not been run.",
"type": ["integer", "null"],
"required": false,
"minimum": 0
},
"text": {
"description": "The cell's text output, represented as an array of strings.",
"type": "array",
"required": false,
"items": {"type": "string"}
},
"html": {
"description": "The cell's html output, represented as an array of strings.",
"type": "array",
"required": false,
"items": {"type": "string"}
},
"javascript": {
"description": "The cell's javascript output, represented as an array of strings.",
"type": "array",
"required": false,
"items": {"type": "string"}
},
"png": {
"description": "The cell's png output.",
"type": "string",
"required": false
}
}
},
"stream_output": {
"description": "Stream output from a code cell.",
"type": "object",
"additionalProperties": false,
"properties": {
"output_type": {
"description": "Type of cell output.",
"enum": ["stream"],
"required": true
},
"metadata": {
"description": "Cell output metadata.",
"type": "object",
"required": true,
"additionalProperties": true
},
"stream": {
"description": "The stream type/destination.",
"type": "string",
"required": true
},
"text": {
"description": "The stream's text output, represented as an array of strings.",
"type": "array",
"required": false,
"items": {"type": "string"}
}
}
},
"error_output": {
"description": "Output of an error that occurred during code cell execution.",
"type": "object",
"additionalProperties": false,
"properties": {
"output_type": {
"description": "Type of cell output.",
"enum": ["error"],
"required": true
},
"metadata": {
"description": "Cell output metadata.",
"type": "object",
"required": true,
"additionalProperties": true
},
"ename": {
"description": "The name of the error.",
"type": "string",
"required": true
},
"evalue": {
"description": "The value, or message, of the error.",
"type": "string",
"required": true
},
"traceback": {
"description": "The error's traceback, represented as an array of strings.",
"type": "array",
"required": true,
"items": {"type": "string"}
}
}
}
}
}