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

triggering parseJSON unnecessarily? #54

Closed
Krinkle opened this issue May 23, 2014 · 2 comments
Closed

triggering parseJSON unnecessarily? #54

Krinkle opened this issue May 23, 2014 · 2 comments

Comments

@Krinkle
Copy link
Owner

Krinkle commented May 23, 2014

From ctemplin on January 26, 2012 17:58:58

What steps will reproduce the problem? 1. Create a ajaxSend event dataFilter that calls $.secureEvalJSON()
3. Check the first argument ("data") of your ajax success event handler. What is the expected output? What do you see instead? typeof data should equal object. instead it's null.

Versions:
Use jQuery Json plugin v2.3 and jQuery (v1.6.4 or v1.7.1) Please provide any additional information below. Not a problem with jQuery v1.4.4

Seems that jquery's parseJSON function is being called and returning null because the input is already an object not a string.

thanks!

Original issue: http://code.google.com/p/jquery-json/issues/detail?id=54

@Krinkle
Copy link
Owner Author

Krinkle commented May 23, 2014

From krinklemail on February 24, 2012 00:29:33

I'm not quite sure what bug you are reporting. jQuery and jQuery JSON are two different project.

jQuery (core) develops $.ajax and $.parseJSON.

jQuery-json plugin adds $.toJSON, $.evalJSON, $.secureEvalJSON, $.quoteString

The function signature of $.secureEvalJSON requires it to be given a string, if your ajax handler is passing it an object, that's nothing we can fix.

@Krinkle
Copy link
Owner Author

Krinkle commented May 23, 2014

From krinklemail on June 13, 2012 09:35:02

Marking this as an invalid bug because this project (the jquery-json project) does not trigger $.parseJSON at all, that is done by $.ajax in jQuery core. Please report this upstream at:

Status: Invalid

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

No branches or pull requests

1 participant