September 24, 2009

Native JSON Parser in Safari

Posted in iPhone development, mac development tagged , , , , , , , at 7:15 pm by tetontech

I just got through running a test and found the Safari has built-in Native JSON parsing and stringifying.  Unfortunately Mobile Safari does not yet have this feature.  I am hoping to be able to remove the json2.js file from QCMac but am unsure yet as to how the native parsing compares to json2.js parsing.

Hopefully the comparison is good and it will soon be found in Mobile Safari so it will also be included in the UIWebView.



  1. hey, i stumbled on your post – I did some crude benchmarks which nonetheless use real-world data (a rendering framework i’m working on) and got some great results. Safari saw a 6x speed increase, and FF3.5 got 15x faster. Amazing.

    • tetontech said,


      Thanks for the info. Am I reading your data right by saying that the safari implementation seems to run at somewhere around 2X the speed of the FireFox implementation?


      • Yeah that’s right. I’m very spoiled by WebKit in general… just got a netbook though – that’ll teach me to optimize my code.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: