iOS Question JSON / STRING

Yvon Steinthal

Active Member
Licensed User
Longtime User
Hi guys,

A weird thing is happening with my current project and i can hardly find the solution as the IDE is not shooting any kind of errors.

I am receiving a json object such as this one:

B4X:
{"20150710104756.jpg":
{"filename":"20150710104756.jpg","image":"iVBORw0K............................."
{"status":"OK"}}

My problem is when i receive this object and put it in a STRING. All hell breaks loose as soon as i try to hover on it to see if its complete. AND i cant send it to a CallSub either, IDE stops with no errors.

The image is in base64, in other words its about 2M in size... i reckon that thats the problem.

So far i have tried to just take a few of these characters and the IDE doesn't shut down, but my image is corrupted of course as its not complete...

EDIT:
Converting to Bytes and sending it to the callsub works, but i have to convert it back to string, and the same problem reappears...

Any clues? Ideas? In the end my image is downloaded successfully but i cannot verify the data while in debug mode at all...
 

Yvon Steinthal

Active Member
Licensed User
Longtime User
2.31

In the end it works, but i guess a 2477000 character string is too much to evaluate on the go?....

I also tried to do a substring of the result from 0 to 200000, and it works fine, i can evaluate with no problem.... if i do substring from 0 to result.length-1, doesn't work either...
 
Last edited:
Upvote 0
Top