Click here to show or hide the menubar.

Home >  Archive >  2010 >  December >  9

Previous / Next

JSONP questions
By Dave Winer on Thursday, December 09, 2010 at 8:34 PM.

A picture named accordion.gifA few developers are working on River of News readers with the JSON river my news app is producing.  permalink

There have been a bunch of requests that I support JSONP, which I am looking into.  permalink

I understand that JSONP is needed so you can access data on domains other than the one from which the page originates. I also understand how it works in a simple case where a small amount of JSON is being returned. But I'm returning 70K of JSON text and it includes tabs, carriage returns and linefeeds.  permalink

1. So the first question is -- should I strip out the whitespace characters? permalink

2. Are there any characters that need to be escaped or neutered? In XML you'd be fine if you encoded left-angle-brackets.  permalink

3. What's the Content-Type? I'm using application/x-javascript for now. Is this correct? permalink

I'm sure there are other questions. :-) permalink

Update: There is now a JSONP version of the river. permalink

RSS feed for Scripting News
This site contributes to the community river.

© Copyright 1997-2012 Dave Winer. Last update: Friday, December 10, 2010 at 6:58 AM Eastern. Last build: 8/26/2012; 6:02:28 PM. "It's even worse than it appears."

RSS feed for Scripting News

Previous / Next