Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

json decode android

public class test
{
    public static void main(String str[])
    {
        String jsonString = "{"stat": { "sdr": "aa:bb:cc:dd:ee:ff", "rcv": "aa:bb:cc:dd:ee:ff", "time": "UTC in millis", "type": 1, "subt": 1, "argv": [{"type": 1, "val":"stackoverflow"}]}}";
        JSONObject jsonObject = new JSONObject(jsonString);
        JSONObject newJSON = jsonObject.getJSONObject("stat");
        System.out.println(newJSON.toString());
        jsonObject = new JSONObject(newJSON.toString());
        System.out.println(jsonObject.getString("rcv"));
       System.out.println(jsonObject.getJSONArray("argv"));
    }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: append line break javascript 
Javascript :: url validation in formcontrol angular 8 
Javascript :: how to get random value less than in array js 
Javascript :: p5js import typescript 
Javascript :: function inside object javascript 
Javascript :: javascript reverse 
Javascript :: js new array from new set 
Javascript :: axios get 
Javascript :: axios httponly cookie 
Javascript :: Remove First and Last Character 
Javascript :: get url parameters javascript 
Javascript :: how to remove last index of array in javascript 
Javascript :: come andare a capo su javascript 
Javascript :: http get response body node js 
Javascript :: create node server 
Javascript :: js combine arrays 
Javascript :: sentry ignore errors 
Javascript :: midpoint formula javascript 
Javascript :: how to check request method was a get 
Javascript :: javascript on uncaught exception 
Javascript :: loop an audio javascript 
Javascript :: jquery validation focus field on error 
Javascript :: js count char frequency in string 
Javascript :: momentjs display timezone 
Javascript :: express add delay 
Javascript :: js join array 
Javascript :: Xpath select Parent Node Based On Child Node 
Javascript :: deep copy in angular 12 
Javascript :: this.setstate is not a function 
Javascript :: moment.js 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =