2

I'm stuck at the point where I don't know how to properly retrieve the information I want. I'm trying to use another website's GET to get their information and then pass it into my own JSON object. There are specific search terms that I would be passing into the external GET resource like so:

(some website)/search?term0=" + term0 + "&term1=" + term1

I already have the JSON destructuring figured out and other associated logic, I'm just stuck on how to get the external data into my application. I'm currently using JSON-java from https://github.com/stleary/JSON-java I have no other JARs that I'm using. I'm not familiar with Ajax, PHP, JQuery, or any of the other stuff.


EDIT: adding some code

URL url = new URL("https://(some website)/search?term0=" + term0 + "&term1=" + term1); JSONObject jsonObj = new JSONObject(url);

trueardor
  • 21
  • 3
  • can you provide your code, you tried so far ? – MD. Khairul Basar Aug 22 '16 at 08:45
  • Are you looking for java code to get JSON from REST service? If so then check out this link: http://stackoverflow.com/questions/4308554/simplest-way-to-read-json-from-a-url-in-java – Max Aug 22 '16 at 09:18

0 Answers0