I am trying to call the Google API, a JSON post request from a Firefox extension, e.g.
POST https://www.googleapis.com/urlshortener/v1/url
Content-Type: application/json
{"longUrl": "http://www.google.com/"}
How can I call this API and handle the response in a Firefox extension?
Simplest way is to use XMLHttpRequest, exactly as you would do from a web page (only that a web page is limited by the same-origin policy).
To serialize and parse JSON see https://developer.mozilla.org/En/Using_native_JSON.