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.

Viagra sales wallmart
Viagra cheap buy online
Canada in levitra
Generics mexico viagra
Rogaine cheapest
Purchase zofran
Hydrochlorothiazide substitute
Buy generic norvasc
Cheapests lasix
Strattera cheap
Over the counter diflucan
Lipitor drug prices
Buy itraconazole sporanox online
40 metronidazole 250 mg
How to find out if your man is cheating
Spouse cheating online
Advice on cheating
Ultram er 200mg
Ultram no prescription
50 mg ultram
U s pharmacy ultram
catch a cheat
how to know when your man is cheating
signs of unfaithful wife
spy on wife computer
can you buy ultram in mexico
catching cheating girlfriend
Strattera 25 mg
10 signs of a cheating boyfriend
how to catch my man cheating
how to tell your girl is cheating
signs that a guy is cheating
signs that your boyfriend is cheating
price of celebrex
toradol medicine
ketorolac 30mg m
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