need help working with json containing large string value

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

need help working with json containing large string value

garneke
I have a json file that contains a base64 encoded data chunk.  The chuck size can vary but it can definitely be larger than 65535 bytes.  I need to be able to parse the file, modify the json and potentially even replace the data chuck with a new one before converting the json object (map)  back to a formatted string for posting to a AMQP Queue.

I am having problems with Groovy's string size limit of 65535.  ( And wtf is that all about btw ).

Does anyone have any suggestions or do I need to find a POJ json solution?
Reply | Threaded
Open this post in threaded view
|

Re: need help working with json containing large string value

Josh Stratton
Might want to check this out:

http://stackoverflow.com/questions/6835798/groovy-says-my-unicode-string-is-too-long

Given your string size is suspiciously close to the call size limit, I think that's what you're really seeing.  Is it possible you're just recursing too deep like possibly recursing through the string?  I think groovy and java have the same string size limit, which is much larger.  

-Josh

On Sun, Feb 5, 2017 at 1:03 PM, garneke <[hidden email]> wrote:
I have a json file that contains a base64 encoded data chunk.  The chuck size
can vary but it can definitely be larger than 65535 bytes.  I need to be
able to parse the file, modify the json and potentially even replace the
data chuck with a new one before converting the json object (map)  back to a
formatted string for posting to a AMQP Queue.

I am having problems with Groovy's string size limit of 65535.  ( And wtf is
that all about btw ).

Does anyone have any suggestions or do I need to find a POJ json solution?



--
View this message in context: http://groovy.329449.n5.nabble.com/need-help-working-with-json-containing-large-string-value-tp5738447.html
Sent from the Groovy Users mailing list archive at Nabble.com.