What's faster to parse lots of data (5Mb): eval or json?

Posted by AlfaTeK on Stack Overflow See other posts from Stack Overflow or by AlfaTeK
Published on 2010-04-09T02:11:59Z Indexed on 2010/04/09 2:23 UTC
Read the original article Hit count: 262

Filed under:
|
|
|
|

I want to get, via ajax, a collection of data objects and parse them into JS data.

Currently I have 2 choices: - Server returns valid javascript code and then I eval it. - Server returns JSON object and then I eval the json object

What is the fastest of these in Firefox? (I only care about the "parsing" performance, not server or data transfer)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery