views:

52

answers:

3

Hi all,
I'd like to implement bit.ly URL shortening service in my application and from biy.ly's API docs I read It uses JSON to short a link...
Unfortunately, I never used JSON and I don't know where to start.
Can anyone explain me how to implement bit.ly URL shortening service in my application?

Thanks,
Matteo

+1  A: 

I Googled "iphone bitly" and found this sample code. Looks like there are a number of libraries and examples out there.

ceejayoz
This is a good point from start but it doesn't work very well with iOS 4.0...
Matthew
+1  A: 

JSON is just a (Javascript) way to encode you're data in name value pairs in an http POST request. So you just need to use a good encoder/decoder API for you're iphone application. See also this tutorial:

tutorial: Json over http on the Iphone

Want to know more about how JSON works, this book has an excelent chapter on it:

JavaScript: The Good Parts

Kdeveloper
You don't need JSON for the Bit.ly API.
St3fan
+1  A: 

Check out my bitly project at github ... http://github.com/st3fan/iphone-bitly

St3fan
How can I return the shortened URL as a string in my action?
Matthew