Questions tagged [touchjson]

Built on Objective-C, TouchJSON is a JSON parser and generator library.

Built on Objective-C, TouchJSON is a JSON parser and generator library. It provides various standard JSON manipulation functionality, like building a JSON, converting an object to JSON, converting and transforming JSON to objects and NSDictionary-ies.

44 questions
18
votes
5 answers

Deserializing a complex JSON result (array of dictionaries) with TouchJSON

I did a few tests with TouchJSON last night and it worked pretty well in general for simple cases. I'm using the following code to read some JSON content from a file, and deserialize it: NSString *jsonString = [[NSString alloc]…
jpm
  • 16,622
  • 34
  • 63
  • 66
16
votes
3 answers

TouchJSON, dealing with NSNull

Hi I am using TouchJSON to deserialize some JSON. I have been using it in the past and on those occasions I dealt with occurrences of NSNull manually. I would think the author had to deal with this as well, so me doing that again would just be…
RickiG
  • 11,380
  • 13
  • 81
  • 120
4
votes
2 answers

Have TouchJSON return mutable objects?

I am receiving some json from a web service. I parse this using the TouchJSON library. I keep the data around for the user to change certain values and then I want to return it to the web service. The JSON object I get contains NSDictionary Objects…
RickiG
  • 11,380
  • 13
  • 81
  • 120
2
votes
1 answer

TouchJSON on iOS: dictionaryWithJSONString unrecognized selector sent to class

I have a static library with TouchJSON in it and I am trying to use dictionaryWithJSONString:error: (within the static library) but I keep getting the runtime exception shown in the title. I have included the NSDictionary category header file and…
Jamil
  • 641
  • 1
  • 7
  • 17
2
votes
1 answer

Problems serializing a dictionary with TouchJson

i'm developing a small app for the ipad and i'm trying to serialize a dictionary to NSData to save in the disk. I'm using with framework TouchJson. And example of my example structure: { line = { 78986928 = ( "NSPoint: {442,…
Adelino
  • 2,530
  • 4
  • 20
  • 32
2
votes
1 answer

Invalid touchJSON string

I get an invalid JSON string, which contains ; ( characters. Any guess what is going on? My Code: -(void)getJSONFeed { // Create the URL & Request NSURL *feedURL = [NSURL URLWithString: …
Zsolt
  • 3,648
  • 3
  • 32
  • 47
2
votes
3 answers

High memory usage when parsing JSON

I'm currently parsing all of my data from JSON and storing it in an array. However when it starts parsing the memory usage jumps up from about 25mb to 800mb. After doing some research I was told to put an @autoreleasepool in the GCD block but to no…
2
votes
3 answers

Json and images

I've got a db on a server and want to get some data fro my iphone. I use TouchJson and everything works fine but I've got a little problem. I don't know how to download images. When I try to build and run the app the emulator just crashes. Got any…
alecnash
  • 1,750
  • 1
  • 18
  • 42
2
votes
2 answers

Map NSDictionary to domain objects after deserializing JSON

In my project I use TouchJSON to deserialize a JSON string. The result is a pretty NSDictionary. I would like to get the data in this dictionary into my domain objects / data objects. Is there a good way to do this? Some best practices? Perhaps the…
Andreas Aarsland
  • 945
  • 2
  • 11
  • 27
1
vote
1 answer

Parsing JSON using Grand Central Dispatch in connectionDidFinishLoading:?

I'm am performing JSON deserialization with JSONTouch, but it's taking too long and it's blocking the UI, so I've tried to make a GCD background queue to put the serialization in a background thread. Sometimes it runs fine, but sometimes I get a…
ReenReen
  • 117
  • 1
  • 9
1
vote
2 answers

touchJSON gives NSInvalidException NSNull isEqualtoString:

Hello I am new to Cocoa Development, and I'm trying to figure out what I did wrong. I followed a (tutorial) that uses touchJSON to fill a tableView with a mySQL database in Xcode. When I run the application everything is working fine, but when I…
Henri Blancke
  • 25
  • 1
  • 5
1
vote
1 answer

Problem Comparing Value Returned by valueForKey Method of NSDictionary

I use TouchJSON to convert the following to an NSDictionary object // sample JSON object { data = ( { companyId = 4779; companyName = "ABC Corporation"; }, { companyId = 4806; …
Wong Gut
  • 61
  • 1
  • 1
  • 5
1
vote
3 answers

TOUCHJSON Serialization from NSDictionary

I've read through the questions and answers related to TouchJSON serialization and I'm still not getting it to work. I create an NSDictionary with sample data and used the JSONTouch serializer to convert the NSDictionary to JSON. However, when I…
Dawn J
  • 21
  • 4
1
vote
0 answers

Memory leak that appears to be in touchJSON

Here's a leak problem that I'm having trouble with. Most of this code is just here for context so you can see that the "response" NSData object is not what's leaking. If I drill down into the touchJSON code, following the stack trace as given to…
adamD
  • 125
  • 2
1
vote
0 answers

TouchJson memory leak?

I'm using TouchJson to parse json data from facebooks graph api. I'm getting some memory leaks though, and I don't really understand why... In my effort to find the leak, I've removed everything else, so the following code is what I'm left with. The…
Joel
  • 8,502
  • 11
  • 66
  • 115
1
2 3