Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

string to JSONobject android

String json = {"phonetype":"N95","cat":"WP"};

try {

    JSONObject obj = new JSONObject(json);

    Log.d("My App", obj.toString());

} catch (Throwable t) {
    Log.e("My App", "Could not parse malformed JSON: "" + json + """);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: get the sum of Json values javascript 
Javascript :: javascript trigger button click using class name 
Javascript :: javascript loop through all element children 
Javascript :: how to get name array value checked in jquery 
Javascript :: jvascript number to column letter 
Javascript :: express hello world 
Javascript :: localstorage read all key 
Javascript :: node express post request json 
Javascript :: javascript array unique values 
Javascript :: round to nearest hundredth javascript 
Javascript :: object foreach 
Javascript :: Angular detecting escape key press 
Javascript :: get select option selected text jquery 
Javascript :: js xmlhttprequest add header 
Javascript :: fullscreen mode javascript 
Javascript :: window replace url 
Javascript :: change font js 
Javascript :: ajax request 
Javascript :: add 1 year to current date javascript 
Javascript :: take only int part of number js 
Javascript :: javascript random char 
Javascript :: jquery submit refresh page stop 
Javascript :: change placeholder javascript 
Javascript :: can we use two versions of jquery in same page 
Javascript :: change logo sapui5 
Javascript :: string to accept two characters after point javascript 
Javascript :: javascript howto get xhr 
Javascript :: jquery select child span 
Javascript :: react localstorage 
Javascript :: reapeat until in js 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =