I don't believe the issue is with converting json into NSDictionaries/ NSArrays / NSStrings / NSNumbers.
My guess would be that you are using the result of the json with autoreleased objects in a tight loop, such as creating thumbnails for all images before the autoreleased pool is emptied.
If they doesn't not fit what your data is doing, can you give us some example as to what type of work is being done on the data set?
This is very bad code because it will continue to stack umcompressed uiimages into the autorelease pool which won't be hit until all the images have been downloaded and made into thumbnails.
NSArray* images = [jsonObject objectForKey:@"images"];
for(NSString* imageURL in images){
NSURL* url = [NSURL URLWithString: imageURL];
NSData* data = [NSData dataWithContentsOfURL: url];
UIImage* image = [UIImage imageWithData: data];
// write image to disk
UIImage* thumbnail = CreateThumbnailFromImage(image);
// write thumbnail to disk
}
The same code can be fixed by adding in another autorelease pool that will clean up the autoreleased objects sooner.
for(NSString* imageURL in images){
@autoreleasepool {
NSURL* url = [NSURL URLWithString: imageURL];
NSData* data = [NSData dataWithContentsOfURL: url];
UIImage* image = [UIImage imageWithData: data];
// write image to disk
UIImage* thumbnail = CreateThumbnailFromImage(image);
// write thumbnail to disk
}
}