I want to know if there is any Java API available to convert a POJO object to a JSON object and vice versa.
Use GSON for converting POJO to JSONObject. Refer here.
For converting JSONObject to POJO, just call the setter method in the POJO and assign the values directly from the JSONObject.