[Developers] RFE: wrap trans/blurb calls in JSON
David Flanagan
david at davidflanagan.com
Tue Jul 22 20:12:44 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).
This is something I just discovered a few weeks ago, and I'm documenting
it for the next version of my MQL tutorial. I've updated my metaweb.js
module from that chapter to support trans URLs, and I've got a
Metaweb.download() utility that uses the callback argument. (Let me know
if you want a draft copy of the updated Metaweb.js code.)
> 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.
It appears that image content is, in fact, encoded in base64. But I
suspect it is not useful to try to use it.
> 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.
Would you send me a the URL at which you're seeing the broken docs?
David Flanagan
>> _______________________________________________
>> 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