I make heavy use of external data in my iPhone applications and for that I rely on JSON. Our server-side data access moved to JSON a while ago as it allows us to support heterogeneous caller types, such as web browsers with JavaScript, server processes and (as seen here) mobile apps.
The latest version of Json.NET is an excellent library. There were a few gotchas for me, when getting it to work with MonoTouch.
1. Project Settings
After downloading the source code, add the Newtonsoft.Json project to your solution. Control+Click the project name and select 'Options'
From the General section, set the Runtime version to 'Mono for iPhone'

Next, from the Compiler section, add the SILVERLIGHT and PocketPC symbols. Be sure both are added to Debug and Release configurations.

2. Using Json.NET in C#
The MonoTouch linker is insanely slick. It's clever enough to exclude unused code from the final, iPhone native executable. However, this can cause issues with reflection based code as come run time, methods and properties you clearly see in source code are just not present or detectable using reflection.
This caught me out at first, as during Json.NET deserialization none of my class properties were being bound to and Json.NET kept complaining that my classes had no default constructor, when they clearly did.
Of course, MonoTouch designers have already thought of this and have given us the MonoTouch.Foundation.Preserve attribute. Adding this to methods or properties will prevent the linker from removing them. The classes I now use for deserialization look (something) like this:
public class Avatar
{
[MonoTouch.Foundation.Preserve]
public Avatar(){}
[MonoTouch.Foundation.Preserve, JsonProperty("url")]
public string Url { get; set; }
[MonoTouch.Foundation.Preserve, JsonProperty("size")]
public string Size { get; set; }
}
Here is the code I use to access the external JSON data and download it into a string instance:
Uri address = new Uri(SERVICE_URL);
HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;
string responseBody = null;
try
{
UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true;
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
var reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
responseBody = reader.ReadToEnd();
}
}
catch ( WebException we )
{
Console.WriteLine( we.Message );
}
finally
{
UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false;
}
Now I can use something similar to the following code to take that string and deserialize it into my class instances:
List<Avatar> memberAvatars = JsonConvert.DeserializeObject<List<Avatar>>( responseBody );