public static InstagramComment fromJson(JSONObject jsonObject) { if (jsonObject == null) { return null; } InstagramComment comment = new InstagramComment(); try { comment.user = InstagramUser.fromJson(jsonObject.getJSONObject("from")); comment.text = jsonObject.getString("text"); comment.createdTime = jsonObject.getLong("created_time"); } catch (JSONException e) { e.printStackTrace(); return null; } return comment; }