PDA

View Full Version : JSON Framework allowed by Apple?




2Cheap2Switch
Jul 30, 2010, 11:31 PM
Hi, I was wondering if any posters on here have used the JSON framework mentioned on this page?

http://blog.grio.com/2009/04/dealing-with-json-on-iphone.html

and if apple approves/allows applications which use it? I have no experience with JSON, so if this framework is allowed it would make my life a lot easier.

Thanks!



namanhams
Jul 31, 2010, 12:57 AM
Hi,

I think as long as that framework doesn't use undocumented API, it should be no problem.

seepel
Jul 31, 2010, 05:22 AM
The iPhone programming class at Stanford actually recommends the JSON framework. Just make sure you don't link it dynamically. Either copy the source files themselves into your project, or include it as a static library.

Luke Redpath
Jul 31, 2010, 07:56 AM
There are a few different JSON options you can use. Here is an interesting performance comparison:

http://samsoff.es/posts/updated-iphone-json-benchmarks

Note that the Apple JSON framework is private and cannot be used.

Its also worth noting that if you have control over the server side API and are able ti serve up your data in binary plist format, its an order of magnitude faster to both download and parse (there is some good data on this in one of the WWDC videos although I can't remember which im afraid.).

2Cheap2Switch
Jul 31, 2010, 11:34 AM
There are a few different JSON options you can use. Here is an interesting performance comparison:

http://samsoff.es/posts/updated-iphone-json-benchmarks

Note that the Apple JSON framework is private and cannot be used.

Its also worth noting that if you have control over the server side API and are able ti serve up your data in binary plist format, its an order of magnitude faster to both download and parse (there is some good data on this in one of the WWDC videos although I can't remember which im afraid.).

I'm definitely going to try out the Touch JSON framework, but does apple approve applications that use it in their app store?

Luke Redpath
Jul 31, 2010, 01:05 PM
I'm definitely going to try out the Touch JSON framework, but does apple approve applications that use it in their app store?

Yes, there is nothing stopping you from using third-party libraries as long as you statically link to them or import the source directly into your project. Its only dynamic linking and use of private Apple frameworks and APIs that is not allowed.

2Cheap2Switch
Jul 31, 2010, 01:17 PM
Awesome! Thanks a ton!

firewood
Jul 31, 2010, 01:48 PM
Yes, there is nothing stopping you from using third-party libraries as long as you statically link to them or import the source directly into your project. Its only dynamic linking and use of private Apple frameworks and APIs that is not allowed.

Unless the library you link to is an Adobe Flash runtime, or something Apple thinks is similar.