×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Karthick Bala
Added: Jul 25, 2014 10:22 AM
Views: 1807
Tags: no tags
  1.     public static JSONObject getJsonObject(JSONObject myJson,String key) throws JSONException{
  2.         JSONObject jsonObj = null;
  3.         String critString = myJson.optString(key,null);
  4.         if(critString!=null && !critString.isEmpty()){
  5.             jsonObj = new JSONObject(critString);
  6.         }
  7.         return jsonObj;
  8.     }