js and operation of the json java

JSON it is now the majority, and the main way to pass data.

Today to talk about the java javascript json of operation

Mentioned js, the moment there is a more mainstream plug-in, vue.js, programmers have not used this plugin also heard about it,

Js a very convenient plug-ins, like js json for the operation of json for example, then you can directly point out, as if the data

data [0] to the index needs to point out,

 

it json java process is more complicated

import org.json.JSON; 

need to guide these bags, for the string of already toString

use
JSONObject obj = new JSONObject (str) ; json converted into
such forms can obj obj.get ( "key") to obtain two json level data
as for the embodiment of an array using JSON obj.getjsonArray and
received value JSONARRAY also required to be received so obj.get (index)
to obtain the data JSONObject

general it, java JSON data processing with respect to PHP it is rather complicated and js


Guess you like

Origin www.cnblogs.com/Thehorse/p/11601066.html