Javascript for Java using JSON

I plan to send a Javascript array object populated with data by encoding it in JSON. Any good jquery plugins for this?

At the end of Java, what is the standard way to parse JSON into a Java array?

The overall flow is as follows:

  • Javascript collects a bunch of data on the current page and stores it in an array.
  • Array object encoded in JSON.
  • Java code saves JSON.
  • Repeat codes and Java compile successful JSON for each page.
  • Java code sends one mega JSON to the server.

Another problem I encountered: 5. How would you send reliable JSON big data to the server?

+2
source share
3 answers

, , API JSON.stringify(). json2.js .

, :

, , . , , , . Json-lib , , , . - , , , -, , , . 1.5 , .

, , , , API, .

, , - SSL . , JS, . SJCL (Stanford Javascript Crypto Library) .

+1

json2.js. , JSON , . json2.js .

, :

$.ajax({
    type: 'post',
    data: JSON.stringify(data),
    contentType: 'application/json',
    dataType: 'json'
});

, JSON.

, SSL.

Java JSON-. json-simple. , JSONObject JSONArray Map List , , .

+1

Java Flexjson JSON. JSON. , , JSONObject/JSONArray .

http://flexjson.sourceforge.net

"Java- MEGA JSON ", . ?

+1
source

Source: https://habr.com/ru/post/1774107/


All Articles