Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Allows python NaN values to be written as null in the JSON data #196

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion influxdb/influxdb08/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import requests
import requests.exceptions
import warnings
import simplejson
from sys import version_info

from influxdb import chunked_json
Expand Down Expand Up @@ -226,7 +227,7 @@ def request(self, url, method='GET', params=None, data=None,
params.update(auth)

if data is not None and not isinstance(data, str):
data = json.dumps(data)
data = simplejson.dumps(data, ignore_nan=True)

# Try to send the request a maximum of three times. (see #103)
# TODO (aviau): Make this configurable.
Expand Down