Skip to content

Commit 43d0432

Browse files
committed
Update to_plotly_json docstrings, add to CHANGELOG.md.
1 parent 9b904c5 commit 43d0432

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## UNRELEASED
6+
7+
### Updated
8+
- Improved json docstrings, added `BasePlotlyType.to_json()` method [[#4301](https://github.com/plotly/plotly.py/pull/4301)]
9+
510
## [5.16.1] - 2023-08-16
611

712
### Fixed

packages/python/plotly/plotly/basedatatypes.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -3318,7 +3318,8 @@ def to_plotly_json(self):
33183318
"""
33193319
Convert figure to a JSON representation as a Python dict
33203320
3321-
Note: May include some JSON-invalid data types, use the `PlotlyJSONEncoder` util when encoding.
3321+
Note: May include some JSON-invalid data types, use the `PlotlyJSONEncoder` util
3322+
or the `to_json` method to encode to a string.
33223323
33233324
Returns
33243325
-------
@@ -5599,7 +5600,8 @@ def to_plotly_json(self):
55995600
"""
56005601
Return plotly JSON representation of object as a Python dict
56015602
5602-
Note: May include some JSON-invalid data types, use the `PlotlyJSONEncoder` util when encoding.
5603+
Note: May include some JSON-invalid data types, use the `PlotlyJSONEncoder` util
5604+
or the `to_json` method to encode to a string.
56035605
56045606
Returns
56055607
-------

0 commit comments

Comments
 (0)