tags:

views:

33

answers:

1

I have a Ajax workflow where i read JSON string of length 10,000 - 50,000 in length. Now function i am using for parsing JSON into javascript Object is throwing exception and failing to execute the statement.

Is there some kind on limit on json string that can be parsed, or eval can execute ?

I have tried

  1. YUI JSON utility to parse and
  2. Also tried eval() and
  3. new Function("return" + jsonString + ";")() also.

But no luck ? can anybody help me with this problem or suggest something.

+2  A: 
T.J. Crowder
+1 for your thoughts, number 2 caught me out early on in my JSON learning - I even filed an IE bug for it lol. This would be a great answer to the question "What are the most common mistakes I'm likely to make with JSON?"
Andy E
+1 Thanks its very nice and clean description.
Anil Namde
@Anil: Ah, good, glad that helped!
T.J. Crowder