Search code examples
jsonjupyter-notebook

Convert .json to ipynb


I am taking a course that uses ipython notebook. When I try to download the notebook (through File -> Download as -> ipython notebook), I get a file that ends with ".ipynb.json". It doesn't open as an ipython notebook but as a .json file so something like this:

{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---\n",
    "\n",
    "_You are currently looking at **version 1.1** of this notebook. To         download notebooks and datafiles, as well as get help on Jupyter notebooks in the Coursera platform, visit the [Jupyter Notebook FAQ](https://www.coursera.org/learn/python-data-analysis/resources/0dhYG) course resource._\n",
    "\n",
    "---"
   ]
  },
...
}

I've tried deleting the ".json" in the file name and it doesn't work. How can I convert this file back to something that can be opened and run as an ipython notebook? Thank you very much!


Solution

  • My Solution: just remove the filename extension .json. for example, change myfile.ipynb.json to myfile.ipynb. Then, you can open it by a click in jupyter notebook !

    I have encounter the same problem as you did. I found a link that describe what ipynb exactly is. see here http://ipython.org/ipython-doc/rel-1.0.0/interactive/nbconvert.html. It says ipynb file is actually json file. Hope this