Package Exports
- @jupyterlab/json-extension
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jupyterlab/json-extension) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
json-extension
A JupyterLab extension for rendering JSON as a tree
Prerequisites
- JupyterLab ^0.27.0
Usage
To render JSON-able dict or list in IPython:
from IPython.display import JSON
JSON({
"string": "string",
"array": [1, 2, 3],
"bool": True,
"object": {
"foo": "bar"
}
})
To render a fully expanded tree:
JSON({
"string": "string",
"array": [1, 2, 3],
"bool": True,
"object": {
"foo": "bar"
}
}, expanded=True)
To render a .json
file, simply open it:
Install
jupyter labextension install @jupyterlab/json-extension
Development
# Clone the repo to your local environment
git clone https://github.com/jupyterlab/jupyter-renderers.git
cd jupyter-renderers
# Install dependencies
npm install
# Build Typescript source
npm run build
# Link your development version of the extension with JupyterLab
jupyter labextension link packages/json-extension
# Rebuild Typescript source after making changes
npm run build
# Rebuild JupyterLab after making any changes
jupyter lab build
Uninstall
jupyter labextension uninstall @jupyterlab/json-extension