Skip to content

Commit 0d566e3

Browse files
committed
use our json encoder everywhere
1 parent 7e8f427 commit 0d566e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plotly/plotly/plotly.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def upload(cls, grid, filename,
700700

701701
payload = {
702702
'filename': filename,
703-
'data': json.dumps(grid_json),
703+
'data': json.dumps(grid_json, cls=utils._plotlyJSONEncoder),
704704
'world_readable': world_readable
705705
}
706706

@@ -778,7 +778,7 @@ def append_rows(cls, rows, grid=None, grid_url=None):
778778
'column' if n_columns == 1 else 'columns'))
779779

780780
payload = {
781-
'rows': json.dumps(rows)
781+
'rows': json.dumps(rows, cls=utils._plotlyJSONEncoder)
782782
}
783783

784784
api_url = (_api_v2.api_url('grids')+
@@ -815,7 +815,7 @@ def upload(cls, meta, grid=None, grid_url=None):
815815
grid_id = _api_v2.parse_grid_id_args(grid, grid_url)
816816

817817
payload = {
818-
'metadata': json.dumps(meta)
818+
'metadata': json.dumps(meta, cls=utils._plotlyJSONEncoder)
819819
}
820820

821821
api_url = _api_v2.api_url('grids')+'/{grid_id}'.format(grid_id=grid_id)

0 commit comments

Comments
 (0)