```java try { JSONObject jsonObject = new JSONObject(jsonString); } catch (JSONException e) { e.printStackTrace(); } ``` ```java if (jsonObject.has("field")) { String value = jsonObject.getString("field"); } else { } ``` ```java try { int value = jsonObject.getInt("field"); } catch (JSONException e) { e.printStackTrace(); } ``` ```java try { } catch (JSONException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } ``` ```java import org.json.JSONException; import org.json.JSONObject; ```