-4

here is a link : https://api.nanopool.org/v1/etn/balance/etnkGqH26XNVZ9cJv7jh95Dwj7LYPupYX5F5QVf85icHXq2sRJcXSxDT6SL4gD2Vn1WBKi5wqd9x5En2LLmDhnKs8pqrcM75VJ to a json file and i would like to get the data on java. So how can i download the file or parsing it directly from internet ?

Thank you

2 Answers2

0

I would recommend https://developers.google.com/api-client-library/java/google-http-java-client/json Library contains support for HTTP requests and easily converts json directly to models (objects).

Siloft
  • 116
  • 4
0

Here is link to a tutorial to do it with Jersey 2 http://www.baeldung.com/jersey-jax-rs-client.

You can fetch the data and deserialize it to POJO class with the library.

There are another ways like Spring RestClient, RestEasy etc. also to do so.

It should not be a problem.

Karan Khanna
  • 1,947
  • 3
  • 21
  • 49