Support JSONP responses #9

Closed
bhollis opened this Issue Oct 1, 2011 · 4 comments

Comments

3 participants
@bhollis
Owner

bhollis commented Oct 1, 2011

JSONView can already parse JSONP responses, it just needs to handle JavaScript MIME types.

@afeld

This comment has been minimized.

Show comment
Hide comment
@afeld

afeld Apr 3, 2013

Express.js's jsonp() method formats responses in the following way (or see a live example):

callbackName && callbackName({
  // ...
});

Would be nice to have this format recognized as JSONP by JSONView.

afeld commented Apr 3, 2013

Express.js's jsonp() method formats responses in the following way (or see a live example):

callbackName && callbackName({
  // ...
});

Would be nice to have this format recognized as JSONP by JSONView.

@bhollis

This comment has been minimized.

Show comment
Hide comment
@bhollis

bhollis Apr 3, 2013

Owner

Makes sense. The regex should be easy to modify, want to send a PR?

-Ben

Sent from my phone

On Apr 3, 2013, at 10:30 AM, Aidan Feldman notifications@github.com wrote:

Express.js's jsonp() method
http://expressjs.com/api.html#res.jsonpformats responses in the
following way (or see a live
examplehttp://omniembed.herokuapp.com/v1.json?callback=foo&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3Yuqxl284cg
):

callbackName && callbackName({
// ...});

Would be nice to have this format recognized as JSONP by JSONView.


Reply to this email directly or view it on
GitHubhttps://github.com/bhollis/jsonview/issues/9#issuecomment-15851148
.

Owner

bhollis commented Apr 3, 2013

Makes sense. The regex should be easy to modify, want to send a PR?

-Ben

Sent from my phone

On Apr 3, 2013, at 10:30 AM, Aidan Feldman notifications@github.com wrote:

Express.js's jsonp() method
http://expressjs.com/api.html#res.jsonpformats responses in the
following way (or see a live
examplehttp://omniembed.herokuapp.com/v1.json?callback=foo&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3Yuqxl284cg
):

callbackName && callbackName({
// ...});

Would be nice to have this format recognized as JSONP by JSONView.


Reply to this email directly or view it on
GitHubhttps://github.com/bhollis/jsonview/issues/9#issuecomment-15851148
.

@neoascetic

This comment has been minimized.

Show comment
Hide comment

+1

@bhollis

This comment has been minimized.

Show comment
Hide comment
@bhollis

bhollis Feb 25, 2015

Owner

These days I can't say I have any use for JSONP in general - CORS is a much better solution. I'm also not interested in chasing down every variant on a "JSONP" response that a different web server might produce. Furthermore, I can't really see JSONView ever being the viewer responsible for text/javascript or application/javascript content. I'm going to close this feature request and likely remove what JSONP support exists in JSONView for the next release.

Owner

bhollis commented Feb 25, 2015

These days I can't say I have any use for JSONP in general - CORS is a much better solution. I'm also not interested in chasing down every variant on a "JSONP" response that a different web server might produce. Furthermore, I can't really see JSONView ever being the viewer responsible for text/javascript or application/javascript content. I'm going to close this feature request and likely remove what JSONP support exists in JSONView for the next release.

@bhollis bhollis closed this Feb 25, 2015

bhollis added a commit that referenced this issue May 30, 2015

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