JSON to String with inner array convertion
I have a larga data JSON which I want to pass to the backend to be parsed there to become into java objects.

To make this I'm using the JSON.stringify function but inside the JSON there is an array attribute that the JSON.stringify is enclosing between quotes ("), so when Gson find it (the way I'm using at the backend to decode the string into objects), it throws an error because this is not an array inside a JSON string representation, but an string attibute inside a JSON string representation.

This is an example of the string generated with JSON.stringify:

{"id": 0, "array": "[{\"id\":0, \"cod\": \"XXX\"}, {\"id\":0, \"cod\": \"XXX\"}]"}

The array attribute cannot be converted by Gson because is not an array.

Can anybody help me with this issue?

Thanks a lot.
JSON to String with inner array convertion
===

I have a larga data JSON which I want to pass to the backend to be parsed there to become into java objects.

To make this I'm using the JSON.stringify function but inside the JSON there is an array attribute that the JSON.stringify is enclosing between quotes ("), so when Gson find it (the way I'm using at the backend to decode the string into objects), it throws an error because this is not an array inside a JSON string representation, but an string attibute inside a JSON string representation.

This is an example of the string generated with JSON.stringify:

{"id": 0, "array": "[{\"id\":0, \"cod\": \"XXX\"}, {\"id\":0, \"cod\": \"XXX\"}]"}

The array attribute cannot be converted by Gson because is not an array.

Can anybody help me with this issue?

Thanks a lot.