Home
Privacy Statement
About Author
Feedback
Report Error
Contact Us
Tutorial
Java Runtime Polymorphisim
OOPs Concept In Java.
How to Build Web Application
Relationship Between Classes
Spring MVC
Spring MVC App By SpringBoot
Spring Boot REST Service
XML:
package easycode.forall.util.json; import org.json.simple.JSONArray; import org.json.simple.JSONObject; public class JSONUtil { public static JSONObject getChildJSONObjectByName(JSONObject jsonObject, String childName) { JSONObject extnJsonObj = (JSONObject) jsonObject.get(childName); if (extnJsonObj == null) extnJsonObj = new JSONObject(); return extnJsonObj; } public static JSONArray getChildJSONObjectArrayByName(JSONObject jsonObject, String childName) { JSONArray jsonObjArray = (JSONArray) jsonObject.get(childName); if (jsonObjArray == null) jsonObjArray = new JSONArray(); return jsonObjArray; } // JSONArray bookJsonArr = (JSONArray)booksJsonObj.get("Book"); }
(Support WhatsApp No. 7439236696 to report any issue or to ask for any new feature.)
There is a monthly cost to run this webs site. You may support us through below UPI QR Code or through Buy Me A Coffee .
Report Defect
|
Submit Feedback
x
x