callback/callback-blackberry — Issue #11: JSON4JStringWriter class has arbitrary buffer size?
Author: filmaj
Created: 2011-12-08 23:04:35+00:00
State: open

This one was a pain in the f*cking ass to track down. What's the reason for having a specific buffer size (and no expanding logic) in the underlying JSON tools?

https://github.com/callback/callback-blackberry/blob/master/framework/ext/src/com/phonegap/json4j/internal/JSON4JStringWriter.java#L15

If you're dealing with big JSON objects this one is going to bite you for sure.

Writing out a JSON object to string on native side (for a plugin, in my case) with a large JSON object (containing Base64 image data, for example) will fail.

This comment should be acted upon: https://github.com/callback/callback-blackberry/blob/master/framework/ext/src/com/phonegap/json4j/internal/JSON4JStringWriter.java#L39