Skip to content

Can we remove our silly JSON.stringify polyfill from examples? #658

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

Closed
gnarf opened this issue Feb 18, 2015 · 6 comments
Closed

Can we remove our silly JSON.stringify polyfill from examples? #658

gnarf opened this issue Feb 18, 2015 · 6 comments
Assignees

Comments

@gnarf
Copy link
Member

gnarf commented Feb 18, 2015

http://caniuse.com/#search=json - support back to IE8

The example in jQuery.extend() has a pretty complex "fake stringify" method and seems overly complex for todays needs.

var printObj = typeof JSON !== "undefined" ? JSON.stringify : function( obj ) {

@arthurvr
Copy link
Member

I wouldn't do it in master yet, as people might just copy-paste and be confused because jQuery 1.x is compatible with IE6+. That being said, I think we can just do this in the v3.0.0-docs branch, as there we don't have to support IE8 anyways.

@arthurvr
Copy link
Member

I can PR if everybody agrees.

@arthurvr arthurvr self-assigned this Feb 18, 2015
@gnarf
Copy link
Member Author

gnarf commented Feb 18, 2015

We could also just use http://api.jquery.com/jQuery.param/ instead? I just
want to simply the example...

On Wed, Feb 18, 2015 at 11:27 AM, Arthur Verschaeve <
notifications@github.com> wrote:

I wouldn't do it in master yet, as people might just copy-paste and be
confused because jQuery 1.x is compatible with IE6+. That being said, I
think we can just do this in the v3.0.0-docs branch, as there we don't
have to support IE8 anyways.


Reply to this email directly or view it on GitHub
#658 (comment)
.

@arthurvr
Copy link
Member

JSON is a little more readable IMHO, but fine with that as well.

@gnarf
Copy link
Member Author

gnarf commented Feb 18, 2015

I Agree that JSON is indeed more readable... I just don't think that JSON
encoder we have in the example is at all readable, and it confuses the
examples quite a bit to try and parse it.

On Wed, Feb 18, 2015 at 11:31 AM, Arthur Verschaeve <
notifications@github.com> wrote:

JSON is a little more readable IMHO, but fine with that as well.


Reply to this email directly or view it on GitHub
#658 (comment)
.

@arthurvr
Copy link
Member

PR gh-661.

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

No branches or pull requests

2 participants