Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove category methods #160

Closed
stig opened this issue Dec 23, 2012 · 4 comments
Closed

Remove category methods #160

stig opened this issue Dec 23, 2012 · 4 comments
Labels
Milestone

Comments

@stig
Copy link
Collaborator

stig commented Dec 23, 2012

No description provided.

@stig stig closed this as completed in fbef34c Jan 19, 2013
michaelochs pushed a commit to rockabyte/json-framework that referenced this issue Feb 5, 2013
@bvanderveen
Copy link

Why? I enjoyed these. :/

@stig
Copy link
Collaborator Author

stig commented Feb 8, 2013

There's primarily two reasons:

  1. Support. Failing to specify the (frankly, magic) flags to get categories working on iOS is the biggest issue people have with the library. (Except perhaps imagined memory leaks, from people steadfastly compiling SBJson without ARC support.) See here
  2. Support, again. When the category methods return nil, there's no obvious way to get at the error. In 3.x the methods NSLog the error, but it's not ideal. I don't want to throw exceptions either.

Saying that, the methods were deprecated in 3.2 - they will only be deleted in the 4.0 release. I do not intentionally break backwards compatibility in minor version releases! :-)

TBH, iOS 5 was released 15 months ago. I wouldn't expect anyone to use SBJson for new apps now if NSJSONSerialisation covers their need. If you go to the bother of installing a third-party JSON library for the benefit of calling a convenient category method I'd say you were crazy. And streaming support can't / won't be done via category methods.

If you're adding JSON support to an iOS 4 app at this point, I'd say you have bigger problems than having to call [[SBJsonParser new] objectWithString:foo] which is all the category methods really gave you.

@bvanderveen
Copy link

Wow! I didn't realize NSJSONSerialization existed! That's good enough for me. Thanks!

@stig
Copy link
Collaborator Author

stig commented Feb 10, 2013

Glad to help!

s2m-updater pushed a commit to SinnerSchraderMobileMirrors/json-framework that referenced this issue Feb 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants