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
0
votes
2 answers

My code is throwing Exception Unrecognized selector sent

This is the code I am using to get string coming through a SBJson parsing: NSMutableArray *abc=[jsonData valueForKey:@"items"]; NSString *imgStr=(NSString *)[abc valueForKey:@"image"]; NSLog(@"%@",imgStr); here abc is NSMutableArray and the…
Atul
  • 111
  • 3
  • 12
0
votes
2 answers

SBJSON Float in NSDictionary written to NSString incorrect

I'm using SBJSON in a project and I'm trying to build a json string from a dictionary. Here's what's going on, I'm putting floats as NSNumbers into a dictionary: NSDictionary* tempdic = [[NSDictionary alloc] init]; tempdic = [NSDictionary…
0
votes
1 answer

iPhone: JSON Parsing with SBJSON Parser gives error

Hi I am making an iPhone app where in I am getting response from webservice in JSON format. I am using SBJSON Parser for parsing my data. I am getting an error while I try parsing the data. I have reffered to following links but none of them did…
Hrushikesh Betai
  • 2,227
  • 5
  • 33
  • 63
0
votes
2 answers

objective-c use SBjson read file.json in project but NSArray return null

th.json {"lessons":[{"id":"38","fach":"D"},{"id":"39","fach":"M"}]} ViewController.m NSBundle *bundle = [NSBundle bundleForClass:[self class]]; NSString *JsonData = [bundle pathForResource:@"th" ofType:@"json"]; SBJsonParser *parser =…
user1913291
  • 1
  • 1
  • 3
0
votes
1 answer

Iphone-SBJson returns null responseData for the connection which get late response in multiple request sending

Here, I tried to send Asynchronous call to python server using SBJson framework. For continuous multiple call with same request, gives null value in response string. here, what I tried : - (NSURLConnection *) GetHttpConnection:(NSString…
Yajushi
  • 1,175
  • 2
  • 9
  • 24
0
votes
1 answer

SBJson Execptions after parsing (__NSArrayM objectForKey:)

I've some problems trying to parse Json using SBJson, I did some research and I can't find something helpfull... I followed some blog about how to do it, but I still get that error : "__NSArrayM objectForKey:" So this is the Json I'm trying to parse…
BaNz
  • 202
  • 2
  • 16
0
votes
1 answer

Issues with posting to php page using SBJSON on iPhone

I am lending the code from a previous project I have done where it worked perfectly. I have tested the page separately which outputs the data using jQuery and it works fine so I know it is an issue within xcode. I am using the following code which…
SamRowley
  • 3,435
  • 7
  • 48
  • 77
0
votes
2 answers

How to fix a No visible @interface for NSString declares the selector JSONValue error

I have encountered this error: No visible @interface for 'NSString' declares the selector 'JSONValue'. The error occurs on: NSDictionary * root = [responseString JSONValue]; NSArray *data = [root objectForKey:@"data"]; does anyone know how to…
hanumanDev
  • 6,592
  • 11
  • 82
  • 146
0
votes
4 answers

SBJsonParser can't parse NSArray

I am trying to parse NSArray to JSON but I get the following error: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM JSONRepresentation]: unrecognized selector sent to instance 0xa93e460' * First…
1110
  • 7,829
  • 55
  • 176
  • 334
0
votes
3 answers

SBJSON parser low memory warning

I am working on JSON data parsing with lots of images downloading and data parsing.I have following code for parsing - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *responseString = [[NSString alloc]…
M007
  • 580
  • 1
  • 5
  • 24
0
votes
1 answer

SBJson Stream Parser crashes

I am working on a webservice in Json with SBJson. When I receive something like that there is no problem : {"error":"The operation failed"} But When I receive something like that, it crashes the app : [{"id":"29"}] Does anybody have an idea…
Thib L
  • 704
  • 1
  • 8
  • 20
0
votes
1 answer

Facebook SDK in combination with JSON help please

I've read a lot of topics about this issue. But none of them really describes my problem. So one the solutions to solve the errors that are occuring if you combinate facebookSDK with JSON is to rename the JSON classes that are causing a conflict. SO…
Foo
  • 596
  • 2
  • 5
  • 21
0
votes
1 answer

JSONValue shows memory leaks

-(void)loadMakes:(NSString *)strValue { NSDictionary *makeJSON = [strValue JSONValue]; NSDictionary *makes = NULL; NSDictionary *car = NULL; NSArray *keys = NULL; NSMutableArray *tempCar = [[NSMutableArray alloc]init]; if ([makeJSON…
DineshKumar
  • 1,641
  • 15
  • 13
0
votes
1 answer

modifying json data in a local file using SBjson

I have recently started Application development on MAC OS 10.6, I am trying to modify a "key/value" pair in a local JSON file on my MAC machine using SBJSON. I have successfully read the value of a key, but I am not able to get that how to modify…
0
votes
2 answers

SBJson parse attempt -- objective C

I'm trying to parse the following JSon (which was validated I think last time I checked): { "top_level" = ( { "download" = "http:/target.com/some.zip"; "other_information" = "other info"; …
stackOverFlew
  • 1,479
  • 2
  • 31
  • 58