Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Error #15

Open
mightym opened this issue Mar 5, 2014 · 1 comment
Open

JSON Error #15

mightym opened this issue Mar 5, 2014 · 1 comment

Comments

@mightym
Copy link

mightym commented Mar 5, 2014

Telegraphy seems to have problems when serializing datetimeformats.
In my case, the field created, a date field:

raise Exception("invalid type for event - serialization failed [%s]" % e)
exceptions.Exception: invalid type for event - serialization failed [datetime.datetime(2014, 3, 5, 20, 10, 30) is not JSON serializable]

@D3f0
Copy link
Contributor

D3f0 commented Mar 10, 2014

JSON does not support datetime. Django uses an enconder (https://github.com/django/django/blob/master/django/core/serializers/json.py#L84), but we need to unserialize this date in the client (since it'll be just a string).
Some plotting libraries prefer epoch-like datetime represetntation, other ISO8601.
At first I belive we'll support ISO8601.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants