Home >  Archive >  2010 >  December >  9

Previous / Next

JSONP questions
By Dave Winer on Thursday, December 09, 2010 at 9: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.  #

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

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.  #

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

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

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

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

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




Christmas Tree
This site contributes to the scripting.com community river.


© Copyright 1997-2011 Dave Winer. Last update: Friday, December 10, 2010 at 7:58 AM Eastern. Last build: 12/12/2011; 12:53:00 PM. "It's even worse than it appears."

RSS feed for Scripting News

Previous / Next