Hi, > Does JSON really have to be all one long line of text?
No, not according to the specs[1]: "Whitespace can be inserted between any pair of tokens". I've definitely used newlines in real-world apps using Prototype's built-in handling for JSON response bodies in Ajax.Requests. Just tested, and this worked fine: * * * * var s; var j; s = "\n{\n'test'\n:\n'value'\n}\n"; j = s.evalJSON(); alert("j.test = " + j.test); * * * * Tested in FF3, IE6, Op9, Safari3 (Windows). I think the problem must lie elsewhere. [1] http://json.org -- T.J. Crowder tj / crowder software / com On Oct 31, 3:00 pm, Walter Lee Davis <[EMAIL PROTECTED]> wrote: > Does JSON really have to be all one long line of text? Is there a way > to break it over lines without getting a syntax error? What are the > rules for this? > > I am generating a database for local searching on a CD-ROM. This ends > up being 370K of text in two lines (titles and authors). TextMate > falls over when I try to edit this locally, naturally, since it tries > to run a recursive regex on each line for folding purposes. > > Thanks in advance, > > Walter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---