I am teaching myself Common Lisp and I'm creating a simple program that interfaces with facebook's graph api. Facebook uses REST and json.
This is a really simple question, but where are the REST libraries in Common Lisp? I can't seem to find it.
If you want to query Facebook API and process their JSON output, you probably need Drakma
(an HTTP-client) and cl-json
or yason
JSON-processing libraries.
In addition to what Vsevolod said. Don't forget to execute
(push (cons "application" "json") drakma:*text-content-types*)
or whatever the content-type Facebook uses or drakma will return data as byte arrays which IIRC no JSON library knows what to do with it.
And my JSON parser library of choice is ST-JSON because it allows you to choose whether you want JS objects decoded as plists or alists.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With