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 + "\"");
}
Also in JavaScript:
- open json file r
- parameters types in javascript
- javascript two character integer
- javascript check number against undefined
- c# loop through json
- jquery addeventlistener
- query params vuejs
- disable inspector
- javascript array push
- json in listview flutter
- Getting Nan when calculate two date js
- jquery select element with data
- callback in js
- how to convert entered number into currency in words in javascript
- javascript get index of object in array
- javascript date parse yyyy-mm-dd
- redux form make field required
- electron getPath
- js fill string with n characters
- mongoose validate example
- loopback not null
- How to check whether a checkbox is checked in jQuery?
- flutter use valuechanged function in function
- render image url in react native