Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to consume a JSON web service in Java [duplicate]

I have a web service exposed to me which returns a json object.

I've been provided with a url http://address.to.web.service:8080/game If enter this in any browser i get a json output.

In my code, I've already implemented logic to populate a web page but using a local json file.

I now need to wire it up with the output of the web service.

Can someone help me understand what might be the simplest way to go for this problem?

like image 341
webExplorer Avatar asked Dec 18 '25 22:12

webExplorer


1 Answers

You need to connect to your webservice, read the full response and convert it to a JSON array. You do not specify which part of the problem you're having problems with.

like image 172
Ayrad Avatar answered Dec 21 '25 11:12

Ayrad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!