I need to write a servlet to hit the third party URL(its a open source url) and this URL returning data in json format.I need to store these data in node.Please suggest
Inside servlet use HTTPClient (from apache commons) api to hit 3rd party url and get the data. If you response is in JSON format use JSONObject or JSONArray objects (from sling commons) and inject the response to the constructors of those objects. From those json objects you get the values by passing keys. Now to create new nodes use Node api (from javax.jcr) and set appropriate properties to the node and save the session by using session.save() method. PS: Your nodes will be created only after execution of session.save() method
Inside servlet use HTTPClient (from apache commons) api to hit 3rd party url and get the data. If you response is in JSON format use JSONObject or JSONArray objects (from sling commons) and inject the response to the constructors of those objects. From those json objects you get the values by passing keys. Now to create new nodes use Node api (from javax.jcr) and set appropriate properties to the node and save the session by using session.save() method. PS: Your nodes will be created only after execution of session.save() method