tag:blogger.com,1999:blog-865923359735383241.post6677996131545516609..comments2023-10-29T07:27:09.012-06:00Comments on Ccna final exam - java, php, javascript, ios, cshap all in one: Best JSON library to use when developing an iPhone application?Unknownnoreply@blogger.comBlogger11125tag:blogger.com,1999:blog-865923359735383241.post-50264798064515127942012-05-31T19:23:49.345-06:002012-05-31T19:23:49.345-06:00I used the JSON Framework, it appeared to work alr...I used the JSON Framework, it appeared to work alright. However at some point I was getting alloc error for SBJsonParser after I had some HTTP communication.<br /><br />Luckily I found JsonKit and my problems have been solved. Its lean and easy to use. In the end what do we need more than the ability to transform some array or dictionary in a JSON string to call your web service and to transform the webservice response from JSON notation back into an array or a dictionary!?Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-49352148927575853282012-05-31T19:23:47.944-06:002012-05-31T19:23:47.944-06:00I have actually just finished developing a very fa...I have actually just finished developing a very fast JsonSerializer (benchmarks here) which also supports Mono (The main reason why I wrote it). It doesn't use any Reflection.Emit so there is a good chance it will just run in MonoTouch. If I get the time, I plan to verify that it works in MonoTouch next week.<br /><br />Basic Example<br /><br />var customer = new Customer { Name="Joe Bloggs", Age=31 };<br />var json = JsonSerializer.SerializeToString(customer);<br />var fromJson = JsonSerializer.DeserializeFromString<Customer>(json); <br /><br /><br />In the meantime you can check out these live examples which are hosted on CentOS/Nginx/Mono FastCGI.<br /><br />EDIT:<br />BTW I have now verified this and it does in-fact work with MonoTouch.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-4330194119002550602012-05-31T19:23:46.773-06:002012-05-31T19:23:46.773-06:00I've used both SBJson (mentioned above) and YA...I've used both SBJson (mentioned above) and YAJL in projects. SBJSON is a lean and easy to use parser, I've found it easy to integrate but it's performance does fall short when compared to YAJL.<br /><br />The YAJL implementation comes with pretty effective type coercion (integers, floats, bools, etc turn in to NSNumbers), speed and event driven (sax style) parsing model. The event driven parsing has been a big win when dealing with larger data sets.<br /><br />SBJSON:<br />http://code.google.com/p/json-framework/<br /><br />YAJL:<br />http://lloyd.github.com/yajl/Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-534617596729182302012-05-31T19:23:45.880-06:002012-05-31T19:23:45.880-06:00I have been using the json-framework from on googl...I have been using the json-framework from on google code. It has worked very well for me.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-70223972870058014802012-05-31T19:23:45.224-06:002012-05-31T19:23:45.224-06:00I've been using touchJSON for a while, but not...I've been using touchJSON for a while, but noticed that it has a problem with line breaks (at least from a UITextView on iOS). Thought about trying to fix it, but bailed out since the character replacement code in TouchJSON tries to be too smart for its own good. <br /><br />Switched to json-framework. Took 10 minutes, and it handles line breaks correctly. My vote is for json-framework.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-38390479272429613822012-05-31T19:23:43.964-06:002012-05-31T19:23:43.964-06:00Just to clarify for future readers, json-framework...Just to clarify for future readers, json-framework and SB-JSON is the same thing.<br />Please correct me if wrong.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-47621887008562647562012-05-31T19:23:42.561-06:002012-05-31T19:23:42.561-06:00There is a comprehensive review by cocoanetics.com...There is a comprehensive review by cocoanetics.com. JSONKit is likely to be the winner.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-8033330517478078112012-05-31T19:23:41.447-06:002012-05-31T19:23:41.447-06:00I think "best" depends on what features ...I think "best" depends on what features you're interested in. If you are after a JSON parser/generator that strictly follows the JSON protocol, then you could do worse than use json-framework. (Disclaimer: I am its author.)<br /><br />It also has a features such as protection against deeply nested structures (could break the stack if left to run wild), pretty-printing the JSON output and sorting the dictionary keys. (This is useful if you want/need to make sure the key ordering in the output is the same after adding/removing entries to a dictionary. Good for automated tests, for example.)<br /><br />There is on-line documentation generated from the source available.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-44923885946694615972012-05-31T19:23:40.691-06:002012-05-31T19:23:40.691-06:00I've had a great experience with http://github...I've had a great experience with http://github.com/stig/json-framework the API is simple and effective.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-71836724440007459022012-05-31T19:23:39.471-06:002012-05-31T19:23:39.471-06:00Another ObjC JSON library is JSONKit. It tends to...Another ObjC JSON library is JSONKit. It tends to be faster and use less memory than the (already mentioned) alternatives. BSD License.<br /><br />JSONKit: https://github.com/johnezang/JSONKitUserhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-54982831708075002642012-05-31T19:23:38.016-06:002012-05-31T19:23:38.016-06:00Touch JSON tends to be the best in terms of speed ...Touch JSON tends to be the best in terms of speed and unit test coverage. It's also the most widely adopted and actively developed.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.com