Results 1 to 2 of 2
  1. #1
    java() is offline Member
    Join Date
    Sep 2014
    Posts
    1
    Rep Power
    0

    Default web api, loading json data

    So I would like to get information out of a web-API. But my question is how I do this. I guess I need to read the URL first. And parse it after but what is the best way?

    For example:

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,030
    Rep Power
    6

    Default Re: web api, loading json data

    That's JSON data. I am not qualified to say what the best way to go about this is, but a way that works is:

    1) HTTP get the data (using for example Apache HTTPClient)
    2) parse the JSON data into Java objects using a JSON parsing API (for example Google GSON)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. IE9 is not loading the data at first time?
    By akiravelmont in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 03-15-2014, 11:38 AM
  2. Getting JSON data from REST-based interface
    By Ace in forum New To Java
    Replies: 2
    Last Post: 10-26-2012, 01:16 AM
  3. loading file data into arraylist...
    By AlphaRaveNZ in forum New To Java
    Replies: 5
    Last Post: 05-08-2012, 03:06 AM
  4. converting MySQL data to JSON
    By newbiejava in forum New To Java
    Replies: 1
    Last Post: 10-06-2010, 04:57 PM
  5. loading data in memory
    By robby14 in forum Advanced Java
    Replies: 10
    Last Post: 04-18-2010, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •