Size limit for JSON and XML parsing?

brycegodfrey
Kilo Contributor

I'm trying to parse a large body of data, and have been unable to do it using JSON.parse or XmlDocument2 due to its large size.

Javascript compiler exception: WrappedException of java.io.UTFDataFormatException: encoded string too long: 278472 bytes in: ....

Is there a system setting I can use to turn this up or another API to get around this limitation?   I'm on Fuji patch 8

13 REPLIES 13

Ahmed Drar
Tera Guru
Tera Guru

Hi Bryce , try to split your string into smaller chunks , i think that can effectively solve your problem. Thanks , Ahmed


Unfortunately, any attempt to split the string will give the same error.



You can test this by going into the ecc_queue and pasting a ridiculously large text into the payload field. Then try and manipulate that field in the background scripts section. Anything as simple as "[temp].payload.substring(0,1)" will throw the "string is too large" error.


Hi Joe,


Do you have any update on your issue?


I'm facing the same with a direct web service where I send a base64 encoded string among other fields, in case the size of this string was larger than 16MB, it was creating automatically an attachment in sys_attachment table with table source the web service staging table.


For some reason now it has stopped working and I see in the logs the same message java.lang.RuntimeException: String object has exceeded max size of 16777216



Any info that might help me with this?



Many thanks in advance,


Rilinda


I think you'll have to use some of the Java APIs to do this, as (I believe) they have access to a larger memory stack.




If that doesn't work, you may have to create your own processor to handle the input stream (also using Java). SN Doesn't like large files...        


Guys, any other type we can use? I also need to process a string larger than 16Mb.