[Developers] RFE: wrap trans/blurb calls in JSON
Aseem Mohanty
aseem at metaweb.com
Tue Jul 22 20:16:11 UTC 2008
Nick Thompson wrote:
> 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.
Binary data when being sent in via the callback= parameter is already
base64 encoded. There is a bug that causes the response content-type to
not be set in the case of a JSONP response. We are working on it and a
fix will make it's way through to freebase.com shortly.
AM
>
> 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
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
More information about the Developers
mailing list