Questions tagged [sbjson]

Related to the SBJson Objective-C JSON parser/generator.

SBJson's homepage is at:

Source code available at:

Tests, containing useful examples:

Example app:

182 questions
30
votes
5 answers

Convert JSON feed to NSDictionary

Where JSON_CATEGORY_DATA_URL_STRING is my feed URL, which returns fine as: [ { "group":"For Sale", "code":"SSSS" }, { "group":"For Sale", "category":"Wanted", "code":"SWNT" } ] I cannot seem…
linkingarts
  • 325
  • 1
  • 3
  • 8
29
votes
6 answers

create a json string from NSArray

In my iPhone aplication I have a list of custom objects. I need to create a json string from them. How I can implement this with SBJSON or iPhone sdk? NSArray* eventsForUpload = [app.dataService.coreDataHelper fetchInstancesOf:@"Event"…
revolutionkpi
  • 2,632
  • 10
  • 45
  • 84
27
votes
2 answers

iOS NSDictionary value determine if Boolean from JSON boolean

I have a JSON response from a web server that looks like this: {"success":true, "token":"123456"} and I want to use that in an if statement, and compare it with "YES". However, doing this doesn't work: NSDictionary *response = [response JSONValue];…
yretuta
  • 7,963
  • 17
  • 80
  • 151
10
votes
9 answers

6 duplicate symbols for architecture i386

duplicate symbol _OBJC_METACLASS_$_SBJsonParser in: /Users/Gaditek/Library/Developer/Xcode/DerivedData/DietBet-gyhoyhmdrobtqregldjyixtgmize/Build/Intermediates/DietBet.build/Debug-iphonesimulator/DietBet.build/Objects-normal/i386/SBJsonParser.o …
Ali Maisam
  • 239
  • 1
  • 3
  • 15
7
votes
1 answer

XCode 4.4.1 ignores LD_RUNPATH_SEARCH_PATHS

I am dealing with a weird behavior of XCode: dyld: Library not loaded: /Library/Frameworks/SBJson.framework/Versions/A/SBJson Basically it ignores my Runpath Search Path (LD_RUNPATH_SEARCH_PATHS) configuration that is actually…
kilianc
  • 7,397
  • 3
  • 26
  • 37
6
votes
1 answer

SBJson - has memory leaks?

I just cloned the git repository for the SBJson framework and imported the source code into my application. Ran a Static Memory profiler and got a little scared from the results I saw. See the picture How is this possible? I doubt the developer of…
Eugen
  • 2,934
  • 2
  • 26
  • 47
6
votes
4 answers

Parsing large quantities of JSON data in iOS

I'm getting a large JSON string (11MB) from a web service. When I parse the data using JSONKit, my app reaches 70MB, I get memory warnings, and the app crashes. How can I parse this data?
aViNaSh
  • 1,318
  • 14
  • 15
6
votes
4 answers

Error with iOS 5.1 when i use ASIHTTPRequest and SBJSON

i am getting this error: Undefined symbols for architecture i386: "_OBJC_CLASS_$_ASIHTTPRequest", referenced from: objc-class-ref in FirstViewController.o "_OBJC_CLASS_$_SBJsonParser", referenced from: objc-class-ref in…
Vacca
  • 1,219
  • 16
  • 26
5
votes
7 answers

How to serialize a class in IOS sdk (Objective-c)?

How to serialize the following class in objective-c so that it can be used with SBJson? I get "JSON serialisation not supported for Animal" error when I use this code. Can someone point out where I am going wrong? The contents of Animal.h file is as…
Billy Samuel
  • 672
  • 2
  • 6
  • 21
5
votes
2 answers

Problem with duplicate classes in JSON frameworks ?

Possible Duplicate: What is the best way to solve an Objective-C namespace collision? In my app I used the SBJSON framework (Stig Brautaset's) to interact with my json api and everything worked very well. But now I am in a situation to use the…
S.Philip
  • 461
  • 7
  • 24
5
votes
3 answers

SBJson iOS parser methods are Deprecated?

I'm starting a new project with SBJson parser, which people seem to recommend as the best on the internet for new iOS projects. I'm having a really strage issue which is that the current methods Stig Brautaset claims you can use on the current…
Jameo
  • 4,507
  • 8
  • 40
  • 66
5
votes
3 answers

Duplicate Symbol Error: SBJsonParser.o?

I currently have ShareKit in my project that is compiled as a static library. It is properly implemented. I also have implemented Amazon's AWS SDK by just adding their framework into my project. It seems that the duplicate symbol is coming from…
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191
4
votes
4 answers

Objective-C - How to convert NSString to escaped JSON string?

I have a NSString that may contain quotes,\, /, \r, \n, and I want to convert it to a JSON encoded string so strings like this "text1\text2" becomes \"text1\\text2\" Is there a existing function to let me do this? Also, I am using SBJson in my…
lakeskysea
  • 591
  • 3
  • 8
  • 15
4
votes
3 answers

Difference between JSON and SBJSON?

Can anyone tell me the difference between json and sbjson? What is the use of these two? Thanks
4
votes
2 answers

How to parse a JSON having no quotes with its KEY string?

I want to parse the json output resulting from the following url in SBJSON framework for iOS http://maps.google.com/maps?q=school&mrt=yp&sll=13.006389,80.2575&output=json while(1);{title:"school - Google…
Firnaz
  • 553
  • 7
  • 31
1
2 3
12 13