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

Static library with SBJson for iOS

I'm developing a static library where i need to use the open source SBJson class. what is the best way to include the SBJson class to my library without needing to include all its header files(.h) when distributing my static library ??
Thomas_LEB
  • 239
  • 5
  • 12
3
votes
1 answer

NSManagedObject to JSON

I have an entity class called catObras, and it inherits from the class NSManagedObject. What I want to do is pass it trough a web service (POST) in JSON form. If I sent the object I receive this: (entity: catObras; id:…
Alejandro Rangel
  • 1,670
  • 1
  • 20
  • 35
3
votes
1 answer

How to test method's return type in Objective-c

I am working on an app that talk to Rest web service. The JSon parser I am using is SBJson. There is this web service on the server side returns a beanA. This bean contains an beanB. Part of the Json I got from the server side is like this when…
Robert Kang
  • 568
  • 5
  • 19
3
votes
2 answers

SBJson in non-ARC project

I am trying to include SBJsonlibrary in my project that does not use ARC. Since I cannot include source files, I've followed the steps described: here. However I end up with the same problems described in this SO question. When I add libsbjson-ios.a…
Maggie
  • 7,823
  • 7
  • 45
  • 66
3
votes
2 answers

"JSONValue" Keyword not getting recognised while using SBJson ?

i have copied SBJson folder into my project and also #import "SBJson.h" But still i am not getting NSDictionary *result = [strResult JSONValue]; Even Xcode does not show any option JSONValue; even if i write JSONValue than it prompt me error No…
Chitra Khatri
  • 1,260
  • 2
  • 14
  • 31
3
votes
1 answer

JSON string from NSDictionary having file path

I am working on the app in which I store the file name and file path in NSDictionary. My dictionary like, Dict Path : { background = "file://localhost/var/mobile/Applications/6118A03F-345B-42D5-AC19-25F6D9AC4484/Documents/background.caf"; …
user7388
  • 1,741
  • 2
  • 19
  • 25
3
votes
1 answer

Detect null and "null"-like JSON values? xcode

I have a problem with inserting data to a cell in tableView. When I searched for the source of error I saw that my webservice is returning null values. So when I call the name to the cell it crashes argumenting that is null. So, cause is a database…
Tidane
  • 694
  • 1
  • 10
  • 22
3
votes
1 answer

NSJSONSerialization and SBJson work oddly

I've tried converting the same NSDictionary object into NSData and then NSString using NSJSONSerialization and SBJsonWriter several times, and sometimes got a different string. even null. It's quite weird and I can't find any reason. =( JSONKit and…
minorblend
  • 905
  • 1
  • 10
  • 23
2
votes
1 answer

iOS AFNetworking - ASP.NET Web API .ASPXAUTH storage and deletion

I'm using the AFNetworking Framework for iOS. I've subclassed AFHttpClient and are using it as a singleton, i.e. [TestAFClient sharedClient] I'm consuming an ASP.NET Web Service API that requires the use of the .ASPXAUTH cookie. First I have to…
Robby Cohen
  • 497
  • 6
  • 21
2
votes
1 answer

SBJSON parsing NSString to NSDictionary

I'm trying to parse an NSString that contains JSON data into an NSDictionary using SBJson 3.0.4, but when I do it, I get this error: "WebKit discarded an uncaught exception in the webView:shouldInsertText:replacingDOMRange:givenAction: delegate: …
The Awesome Guy
  • 322
  • 5
  • 15
2
votes
1 answer

Special characters in Xcode/ios5 to SBJso

I am having a problem with sending special characters on iOS5 through sbjson to a web service. I get the error: -[NSNull isEqualToString:]: unrecognized selector sent to instance I have tried to send the json string without special characters,…
pvaskeli
  • 23
  • 4
2
votes
3 answers

Stig JSON library parse error: How do you accommodate new lines in JSON?

I have some xml that is coming back from a web service. I in turn use xslt to turn that xml into json (I am turning someone else's xml service into a json-based service). My service, which is now outputting JSON, is consumed by my iphone app using…
user798719
  • 9,619
  • 25
  • 84
  • 123
2
votes
1 answer

Replace tab in NSString with \t

I'm parsing json with SBJson. I receive an error "-JSONValue failed. Error is: Unescaped control character [0x09]" when parsing my json string, it has unencoded tab. How to replace this tab in my json string to \t? If i remove tab manualy,…
Timur Mustafaev
  • 4,869
  • 9
  • 63
  • 109
2
votes
1 answer

Obj-C: Convert an Array of objects into an NSDictionary for use with JSONRepresentation

I have an NSMutableArray of custom objects with various information them. For instance the object might contain: firstname lastname email I'd like to be able to add these objects to an NSDictionary, so that I can call SBJSON's 'JSONRepresentation'…
Adam Johnson
  • 2,198
  • 1
  • 17
  • 23
2
votes
1 answer

Serialize JSON string SBJSON vs NSJSONSerialization vs anything else?

I am receiving this JSON string and want to know how to serialize it into a dictionary so that I can parse it into a managed object. I have looked at a few ways (named in the title), and can't seem to find the simplest, quickest alternative. I would…
William Falcon
  • 9,813
  • 14
  • 67
  • 110
1
2
3
12 13