[Developers] RFE: wrap trans/blurb calls in JSON

Nick Thompson nix at metaweb.com
Tue Jul 22 17:36:38 UTC 2008


trans/raw does actually accept a "callback=" argument that will make
it return JSONP (not JSON, but you can chop off the jsonp wrapper).

JSONP handling for binary types (e.g. images) may not work, there have
been limited use cases for this.  the right thing is probably to base64
the binary content, maybe you could construct a data: url with it or
something to actually display an image in the browser.

Using JSONP for text/* types is well-tested - it's how Mjt applications
fetch articles, for example.

     nick

Shug Boabby wrote:
> Hi,
> 
> I have a request... would it be possible to return trans/blurb calls
> as JSON, if say a parameter 'json=true' was set? This would be great
> as it would allow programmatic access to the blurb instead of having
> to use an iframe.
> 
> Note that the documentation on accessing trans/blurb is completely
> broken, many of the sentences are just missing words. I suspect this
> may be something to do with the use of iframe tags or something in
> your markup.
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers


More information about the Developers mailing list