touchjson

Memory leak that appears to be in touchJSON

核能气质少年 提交于 2019-12-11 08:00:33
问题 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 me by the LEAKS tool, the leak apparently begins life at the line *outStringConstant .... But since this is such a commonly used library, I doubt it's the problem. One note. This doesn't leak the first time it's executed, only every subsequent time.

Have TouchJSON return mutable objects?

我是研究僧i 提交于 2019-12-06 05:17:29
问题 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 within the object, like this: [ { "id": null, "created_at": 12332343, "object": { "name": "Some name", "age" : 30 }, "scope": "it stuff", "kind_id": 1, "valid": true, "refering_statement": { "id": 95 }, "user": { "id": 1 } } ] If I want to change

Parse JSON array

戏子无情 提交于 2019-12-01 14:19:58
I fetch a JSON array from a web service with touchJSON. Which looks like this: [{"icecream": {"title": "Banana"}}, {"icecream": {"title": "Strawberry"}}] I'm not able to parse this into a NSDictionary, because touchJSON doesn't support JSON arrays. How do I get my JSON array into a NSDicitionary? Regards Have you consider trying another framework? This one seems to support JSON arrays. Maybe you could use another of the many JSON implementations listed on the JSON homepage. You can chekc out the JSON webpage , where they provide links to parsing code in dozens of languages. However, at first

Parse JSON array

女生的网名这么多〃 提交于 2019-12-01 13:07:28
问题 I fetch a JSON array from a web service with touchJSON. Which looks like this: [{"icecream": {"title": "Banana"}}, {"icecream": {"title": "Strawberry"}}] I'm not able to parse this into a NSDictionary, because touchJSON doesn't support JSON arrays. How do I get my JSON array into a NSDicitionary? Regards 回答1: Have you consider trying another framework? This one seems to support JSON arrays. 回答2: Maybe you could use another of the many JSON implementations listed on the JSON homepage. 回答3: You

Monotouch binding for TouchJSON?

旧巷老猫 提交于 2019-11-28 11:29:13
问题 The admob sdk for iPhone uses a proprietary libAdMobNoThumb.a library and an Objective-C source based TouchJSON library. Does anybody know of a C# binding for TouchJSON so that we can include it? Or does anybody know how to build a library that can be included? We created an iPhone Library project with Xcode and added the full TouchJSON source tree. We've than linked the resulting libTouchJSON.a in a test iPhone app with following gcc_flags: -v -v -v -gcc_flags "-L${ProjectDir}/Lib

TouchJSON, dealing with NSNull

一笑奈何 提交于 2019-11-27 01:36:37
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 overhead. I then found this in the documentation: Avoiding NSNull values in output. NSData *theJSONData = /* some JSON data */ CJSONDeserializer *theDeserializer = [CJSONDeserializer deserializer]; theDeserializer.nullObject = NULL; NSError *theError = nil; id theObject = [theDeserializer deserialize:theJSONData error:&theError];} The way I understand it

TouchJSON, dealing with NSNull

天大地大妈咪最大 提交于 2019-11-26 12:27:48
问题 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 overhead. I then found this in the documentation: Avoiding NSNull values in output. NSData *theJSONData = /* some JSON data */ CJSONDeserializer *theDeserializer = [CJSONDeserializer deserializer]; theDeserializer.nullObject = NULL; NSError *theError =