Hello I am building an app in Java and I would like to get the latitude/longitude from a string address.
Every tutorials I found was quite old and doesn't seem to be the more "up-to-date" solution nowadays...
I guess I should use the Jackson API to convert JSON result to Java object after requesting Google Geocoding API which returns me results like these JSON response
According to this tutorial Jackson convert JSON to Java object here is what I should use:
ObjectMapper mapper = new ObjectMapper();
Staff obj = mapper.readValue(new URL("http://mkyong.com/api/staff.json"), Staff.class);
What I don't understand is if the "Staff class" ( which in my case will probably be a "Address class" ) should contains every attribute such as excepted in the JSON response or can I just choose those I am interested in ( lat/long) ?
Am I on the right way ?
EDIT : It is not an android project