JSON.parse(x) in node choking on over 16,000 chars?


#1

Hi, trying to insert json from an api into mongo using node. Code works fine when the json length is less than 16,??? characters. Over 16K chars and I am getting errors that seem to indicate that the json is getting cut off, such as:

Unexpected end of input
Unexpected token D (or I, or some other single character)

I’m thinking this has something to do with the buffer size within the response object? Just guessing - any clues on how to fix? Thanks,


#2

You may have more luck getting an answer to this on stackoverflow.com, as it doesn’t sound Cloud9 specific. I tried some quick googling but had no luck.