Read JSON from web

Discussion in 'Plugin Development' started by pedrinholuizf, Sep 20, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    pedrinholuizf

  2. Offline

    rbrick

    @pedrinholuizf
    Make a HTTP request (GET method in the case of mcping.net).
    You can make HTTP requests either with the HttpURLConnection class, or through use of a third-party library such as Apache's HttpClient, then you would parse the JSON response with a library like GSON.
     
  3. Offline

    teej107

    Or json-simple because it's already part of the Bukkit API.
     
    rbrick likes this.
  4. Offline

    rbrick

    @teej107 didn't realize that was included.
     
    Last edited: Sep 20, 2015
Thread Status:
Not open for further replies.

Share This Page