[ckan-dev] API response as XML?

David Read david.read at okfn.org
Mon Oct 3 13:08:09 UTC 2011


On 3 October 2011 12:24, Chris Wallace <kit.wallace at gmail.com> wrote:

> According to the wiki - http://wiki.ckan.org/API  "By default, the
> response format is JSON."  but  in the base API  documentation
> http://docs.ckan.org/en/latest/api.html there is no mention of any
> alternative format.


Chris,

We found JSON to be the most convenient for Javascript clients and it also
suited easy use in more general clients like PHP, Python etc.. But we're
also keen to interface well with a variety of other metadata formats,
particularly the standards like CSW, dcat and RDF (including the XML
variety).


>   I understand from Rufus that only JSON and RDF as n3 is supported.  For
> my work with XML languages such as XQuery, API reponses as XML would be
> preferable.  What's the probability of CKAN supporting this  format in the
> near future?
>

Will Waites has setup the semantic.ckan.net service which provides
translations into Linked Data formats which includes rdf-xml, and this is
what I believe Rufus was referring to.

When requesting a CKAN dataset web page, if you include a header like
"Accept: application/rdf+xml" then it 303 redirects you to the rdf
representation at semantic.ckan.net.

There is a little info about this here:
http://readthedocs.org/docs/ckan/en/latest/configuration.html#rdf-packages

Do tell us about your work in XML and CKAN. And it would be interesting to
hear if this solution is useful for your project.

David


>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20111003/d15d92f3/attachment-0001.html>


More information about the ckan-dev mailing list