Converting JSONArray to String in javascript to send to java Converting JSONArray to String in javascript to send to java json json

Converting JSONArray to String in javascript to send to java


Assuming jsonArray holds all the data you want to send to Java do:

var jString = JSON.stringify(jsonArray);

Now 'jString' is the json encoded string representation of your array.