Skip to content

Objective-C REST and JSON

Bringing in the HarvestThe first REST based code I wrote for the Mac and iOS was my P8 Library for ping.fm. That code is all NSRequest based and I learned a lot while doing it. Since that time I’ve done a couple more projects that consumed REST Services and XML or JASON.

To that end I thought I’d record some of the libraries I’ve run across. Some I’ve used, others are a curiosity.

REST Libraries

ASIHTTP – I’ve used this library a couple of times and I’m using it on a new project. I like it, but the developer that lovingly created it is giving up on it because people gave him too much crap. That’s a real shame, not only that he’s done with it, but that people would harass him so much he gave up on a very handy piece of code.

LRResty – A simple REST/HTTP client. Apparently this library was inspired by a Ruby implementation. I’m fairly certain this is the library I’ll be moving to this in the future.

RestKit – This library not only deals with retrieving data, it will also map it into Core Data. Pretty cool, and if you have need to cache data locally it would be worth looking at.

JSON

SBJson – A very nice JSON parser. It’s simple to use and includes handy categories for NSString and NSDictionary. It’s very simple to create a parser and operate on the results, just like you would an NSDictionary.

SBJsonParser* jsonParser = [[SBJsonParser new] autorelease];
id jsonObject = [jsonParser objectWithString:jsonString];

JSONKit – This is a parser I only recently discovered, and it’s known to be fast and efficient. It’s also super easy to use because of, you guessed it, categories. There’s a real nice one added to NSString.

NSDictionary* response =
[[request responseString] objectFromJSONString];

See how easy that is to use? You simply invoke objectFromJSONString to get a fully parsed result jammed into an NSDictionary.

Categories: Development.

Tags: , , ,

Comment Feed

No Responses (yet)



Some HTML is OK

or, reply to this post via trackback.

Lasix online without prescription
Clonidine 0.1 mg
Buy strattera
Purchase depo provera
150mg clomid online sales
Provera natural alternative
Order clomid online
Atorvastatin 20 mg a day
Keflex 700 mg
Amoxicillin 100mg ct
Generic vantin
How do you know if husband is cheating
How do i find out my telephone number
When your husband has an affair
Ultram sale
Canada ultram
Buy ultram 100 mgs online
Ultram order
gps tracking with cell phone
signs of a spouse cheating
signs of your husband cheating
tramadol online
Tramadol Online
buy tramadol without a prescription
tramadol withot a prescription
Cheap strattera online
Men's health extenze
signs of cheater
how to catch a cheating wife
buying nexium from canada
buy tramadol cod
canada order tramadol online
purchase cheap tramadol
tramadol 100mg medicine
doxycycline 100mg bid
prescription zithromax doxycycline
generic cialis
buy tramadol online
buy synthroid online
order tramadol online
buy vibramycin
buy toradol
buy lidocaine
buy celebrex
buy flagyl
lasix furosemide
canadian family pharmacy
cialis online
tramadol 100mg
nexium generic
buy nolvadex
how to catch a cheating wife
generic viagra
Canadian Family Pharmacy
buy nolvadex