Read file json
Tags: #naas #jupyter-notebooks #read #snippet
Author: Florent Ravenel

Input

Import libraries

1
import json
2
from pprint import pprint
Copied!

Variables

1
# Input
2
notebook_path = "../template.ipynb"
Copied!

Model

Open file

1
with open(notebook_path) as f:
2
nb = json.load(f)
Copied!

Output

Display result

1
pprint(nb)
Copied!
Copy link
Edit on GitHub