Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between JSON and SBJSON?

Tags:

json

sbjson

  • Can anyone tell me the difference between json and sbjson?
  • What is the use of these two?

Thanks

like image 698
Senthil Raja Ramasamy Avatar asked Sep 04 '26 01:09

Senthil Raja Ramasamy


1 Answers

JSON and SBJSON cannot be compared because one is a standard/protocol, and the other is a language-specific implementation made to use that standard.

JSON stands for Javascript Object Notation. It is just a standard for transmitting data (similar to XML, but more lightweight). Also see this answer for some more info.

SBJSON is one of the many open-source json parsers/generators created with Objective-C. Some other ones are touchJSON and JSONKit. These allow you to use JSON easily when coding Objective-C apps.

As of iOS 5, there is a built in class called NSJSONSerialization to do this for you. If you want to support any iOS version prior to iOS 5, you will need to use something like one of the previously mentioned frameworks.

In any environment, you would typically use JSON for transmitting/receiving data from a remote source, such as a RESTFUL web service.

like image 72
Dima Avatar answered Sep 05 '26 15:09

Dima