8
8
from copy import deepcopy , copy
9
9
import itertools
10
10
from functools import reduce
11
- import json
12
11
13
12
from _plotly_utils .utils import (
14
13
_natural_sort_strings ,
18
17
display_string_positions ,
19
18
chomp_empty_strings ,
20
19
find_closest_string ,
21
- PlotlyJSONEncoder ,
22
20
)
23
21
from _plotly_utils .exceptions import PlotlyKeyError
24
22
from .optional_imports import get_module
@@ -3318,7 +3316,7 @@ def to_dict(self):
3318
3316
3319
3317
def to_plotly_json (self ):
3320
3318
"""
3321
- Convert figure to a JSON representation as a Python dict.
3319
+ Convert figure to a JSON representation as a Python dict
3322
3320
3323
3321
Note: May include some JSON-invalid data types, use the `PlotlyJSONEncoder` util when encoding.
3324
3322
@@ -5611,12 +5609,12 @@ def to_plotly_json(self):
5611
5609
5612
5610
def to_json (self , * args , ** kwargs ):
5613
5611
"""
5614
- Convert to a JSON string representation.
5612
+ Convert object to a JSON string representation
5615
5613
5616
5614
Parameters
5617
5615
----------
5618
5616
validate: bool (default True)
5619
- True if the figure should be validated before being converted to
5617
+ True if the object should be validated before being converted to
5620
5618
JSON, False otherwise.
5621
5619
5622
5620
pretty: bool (default False)
@@ -5636,7 +5634,7 @@ def to_json(self, *args, **kwargs):
5636
5634
Returns
5637
5635
-------
5638
5636
str
5639
- Representation of figure as a JSON string
5637
+ Representation of object as a JSON string
5640
5638
"""
5641
5639
import plotly .io as pio
5642
5640
0 commit comments