Show More
@@ -56,8 +56,12 b' class JSONWriter(NotebookWriter):' | |||||
56 | kwargs['indent'] = 1 |
|
56 | kwargs['indent'] = 1 | |
57 | kwargs['sort_keys'] = True |
|
57 | kwargs['sort_keys'] = True | |
58 | kwargs['separators'] = (',',': ') |
|
58 | kwargs['separators'] = (',',': ') | |
|
59 | nb = copy.deepcopy(nb) | |||
|
60 | # don't write transient values to disk | |||
|
61 | for key in ('orig_nbformat', 'orig_nbformat_minor'): | |||
|
62 | nb.pop(key, None) | |||
59 | if kwargs.pop('split_lines', True): |
|
63 | if kwargs.pop('split_lines', True): | |
60 |
nb = split_lines( |
|
64 | nb = split_lines(nb) | |
61 | return py3compat.str_to_unicode(json.dumps(nb, **kwargs), 'utf-8') |
|
65 | return py3compat.str_to_unicode(json.dumps(nb, **kwargs), 'utf-8') | |
62 |
|
66 | |||
63 |
|
67 |
General Comments 0
You need to be logged in to leave comments.
Login now