Get Updates By E-mail 

json

Easy iPhone and iPad Library For Communicating With Web Services – Open Source

  •  
  •  
  •  
  •  
  •  

Communicating with web services in your iPhone and iPad apps can be somewhat of a pain, and that’s why several open source libraries have been created to allow you to do just that.

While some of those libraries are good, I love it when someone comes up with something even easier.  I found out on Twitter the other day about a great new open source library called Seriously which appears to be a very promising library for easy communication with web services and JSON parsing (XML parsing coming soon).

Just take a look at this code to grab the background image url from a twitter account:

    NSString *url = @"http://api.twitter.com/1/users/show.json?screen_name=probablycorey";

    [Seriously get:url handler:^(id body, NSHTTPURLResposne *response, NSError *error) {
        if (error) {
            NSLog(@"Got error %@", error);
        }
        else {
            NSLog(@"Look, JSON gets parsed into an dictionary");
            NSLog(@"%@", [body objectForKey:@"profile_background_image_url"]);
        }
    }];

Looks pretty good to me, short and sweet.

You can download Seriously on Github here:
http://github.com/probablycorey/seriously

If you liked this, please share it!


  •  
  •  
  •  
  •  
  •  

Using Objective-C JSON To Do Translations In An iOS App

  •  
  •  
  •  
  •  
  •  

JSON is a topic that is often searched for on this website.

It’s no wonder as many web services distribute data using the JSON (JavaScript Object Notation) format.  A few libraries have been created for the iPhone, but good examples are difficult to come by.

Something else that I’ve also seen people search for one this site is translations, and with the use of one of these JSON frameworks it is possible to gather data from Google Translate, and parse that data without to much trouble.

On that note, Ray Wenderlich has created an excellent How To Translate Text With Google Translate and JSON on the iPhone tutorial which goes through the process of using the open source JSON-framework in a step-by-step manner to translate data wihin an iPhone application.

So if you are looking to figure out how to get this done I highly suggest checking out this Objective-C JSON tutorial.

Thanks for reading, if you found this useful please share it!

[Source: Ray Wenderlich]


  •  
  •  
  •  
  •  
  •