Android Question maxJsonLength

Carles Escudé

Member
Licensed User
Longtime User
I am trying to get a base64 coded image and getting it in a json string. Then I decode it and show in my app. That works until I try to get a bigger image where I get the following message:

Spanish:
System.InvalidOperationException: Error durante la serialización o deserialización mediante JavaScriptSerializer de JSON. La longitud de la cadena supera el valor establecido en la propiedad maxJsonLength.

English:
Exception information:
Exception type: InvalidOperationException
Exception message: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

The json string I am trying to get is less than 3000000 characters.

I was looking information about it and I found this:

http://stackoverflow.com/questions/1151987/can-i-set-an-unlimited-length-for-maxjsonlength-in-web-config

But the error persists.

I am using libraries HTTP (v1.36) and JSON (v1.10).

Thank you very much in advance
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Carles Escudé

Member
Licensed User
Longtime User
I don't know... That's the error I get using B4A.

B4X:
Dim job1 As HttpJob   
job1.PostString(Url, prms)

After that I get the error I write before.
 
Upvote 0

Carles Escudé

Member
Licensed User
Longtime User
B4X:
Sub JobDone (Job As HttpJob)
    If Job.Success = True Then
        Select Job.JobName
            Case "Job2"
[...]

When I send the image, Job is not success, I get the error and the program brokes.
When I don't send the image it works ok.

Thanks for the interest. ;)
 
Upvote 0

Carles Escudé

Member
Licensed User
Longtime User
Yes. I know that. I start saying i was looking if the solution may be in some configuration in the web.config file.
I was asking if somebody know how to solve it.

I will try with the MSSQL library.

Thanks for all.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top