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

Django JSON reply is invalid JSON format #602

Closed
thedp opened this issue Jan 22, 2017 · 4 comments
Closed

Django JSON reply is invalid JSON format #602

thedp opened this issue Jan 22, 2017 · 4 comments
Labels

Comments

@thedp
Copy link

thedp commented Jan 22, 2017

I'm having some trouble parsing the reply from django.
It seems the reply contains single quotes instead of JSON standard double quote.
Also, other values that can't be converted with javascript jsonParse, like datatime: 'created_at': datetime.datetime(2017, 1, 22, 17, 38, 35, 878994).

Is it a bug?

Thanks.

@vkosuri
Copy link
Collaborator

vkosuri commented Jan 23, 2017

@thedp can you elaborate more on this issue?

@gunthercox gunthercox added the bug label Jan 23, 2017
@alekaizer
Copy link
Contributor

@thedp datetime is not JSON serializable
Maybe you receiving a byte-type response too, can you provide more infos ?

@thedp
Copy link
Author

thedp commented Jan 24, 2017

@vkosuri
The JSON reply is structured like this: {"text": {'text':'something', 'created_at': datetime.datetime( . .
In order for this JSON to be valid, the single quotes need to be double quotes, and the datetime shouldn't be there, or replaced with Unix epoch maybe.

@alekaizer What kind of info should I provide?

@gunthercox
Copy link
Owner

I've identified the cause of this issue. Working on a fix.

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

No branches or pull requests

4 participants