Show More
@@ -800,7 +800,7 b' class JSON(DisplayObject):' | |||
|
800 | 800 | """ |
|
801 | 801 | # wrap data in a property, which warns about passing already-serialized JSON |
|
802 | 802 | _data = None |
|
803 | def __init__(self, data=None, url=None, filename=None, expanded=False, metadata=None, **kwargs): | |
|
803 | def __init__(self, data=None, url=None, filename=None, expanded=False, metadata=None, root='root', **kwargs): | |
|
804 | 804 | """Create a JSON display object given raw data. |
|
805 | 805 | |
|
806 | 806 | Parameters |
@@ -817,8 +817,13 b' class JSON(DisplayObject):' | |||
|
817 | 817 | Metadata to control whether a JSON display component is expanded. |
|
818 | 818 | metadata: dict |
|
819 | 819 | Specify extra metadata to attach to the json display object. |
|
820 | root : str | |
|
821 | The name of the root element of the JSON tree | |
|
820 | 822 | """ |
|
821 |
self.metadata = { |
|
|
823 | self.metadata = { | |
|
824 | 'expanded': expanded, | |
|
825 | 'root': root, | |
|
826 | } | |
|
822 | 827 | if metadata: |
|
823 | 828 | self.metadata.update(metadata) |
|
824 | 829 | if kwargs: |
General Comments 0
You need to be logged in to leave comments.
Login now