PB 2017 R3 build 1858 32 bit application
I have been doing a lot of web client refactoring lately, using JSON.
I some instances I send and receive huge JSON return data sets, of a complex, nested nature and containing base64 encoded images.
One serious problem is that I cannot encode image blobs of more than up to about 12.5 Mb(13 or more always fails) size using Base64Encode. The result string from that function becomes Null. I have not tested decoding.
This problem is reproducible with a very simple piece of code:
ls_filepath = "c:\temp\volume_test.txt"
li_fileno = fileopen (ls_filepath,streammode!,read!, shared!) // put 13 Mb here
ll_count = filereadex(li_fileno, lbl_data) // long, blob
fileclose (li_fileno)
ls_base64 = iuo_coder.base64encode(lbl_data) // becomes Null :(
The other problem, which may be related, is about retrieving and parsing large JSON data sets containing base64 encoded images. If the size is for instance about 18 mb (the limit may be the same as above, not tested), JsonPackage.Getvalue returns an ugly Null, preventing further parsing. In this case the value is an object array, and the base64 string is one of the members of one array item. The size is the only difference from working data sets. It works nicely if the size is not too high, and the system has been in production for almost a year, with high intensiity utilization, so I believe it is all about capacity limitations. Further the data does not have to be a base64 encoded image. Any type of base64 encoded document data behaves similarly.
This occurs in IDE and runtime.
pbcrypt170.dll is deployed to runtime environments.
regards
sverre