telegraphy
telegraphy copied to clipboard
JSON Error
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]
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.