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

Making parse more robust #27

Closed
wants to merge 4 commits into from
Closed

Making parse more robust #27

wants to merge 4 commits into from

Conversation

rek
Copy link
Contributor

@rek rek commented Jan 27, 2016

This was failing when the content of JSON responses was not JSON.

@doublerebel
Copy link
Member

Hi @rek, thanks for your contribution.

The behavior of jQuery (doc here under dataType) is to reject malformed JSON and throw a parse error. Changing this behavior might break existing apps using najax. Would it be possible for you to use najax with a plain text dataType and parse JSON in your own code?

@rek
Copy link
Contributor Author

rek commented Mar 13, 2016

Ahh ok, interesting. I'll give that shot :) Thanks.

@JoshuaCWebDeveloper
Copy link

@rek was on the right track here. jQuery actually doesn't allow the parse error to bubble up, and only returns it to the success handler. #46 Attempts to emulate that behavior.

@alanclarke
Copy link
Contributor

@rek @JoshuaCWebDeveloper is this superseded by #56?

@rek
Copy link
Contributor Author

rek commented Mar 15, 2017

Ahh I have no idea, was a while ago. I am happy to close this PR now though, it's a touch old.

@rek rek closed this Mar 15, 2017
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

Successfully merging this pull request may close these issues.

4 participants