Show how to use Jackson and Json.org API to parse a json data
I've used these links:
- http://www.openweathermap.org/api#weather
- http://api.openweathermap.org/data/2.5/weather?q=Quebec,QC&units=metric
- http://wiki.fasterxml.com/JacksonInFiveMinutes
- http://www.json.org/java/index.html
In the class com.sfragata.weather.test.OpenWeatherTest I've created two test methods:
- testOpenweatherJackson: How to use jackson's API
- testOpenweatherJSON: How to use json.org's API
I've used the OpenWeatherMap's data to show how to parse json into java class (Jackson) and how to get data from json (json.org)
=======
Montrez comment utiliser Jackson et Json.org API pour analyser des données json
J'ai utilisé ces liens :
- http://www.openweathermap.org/api#weather
- http://api.openweathermap.org/data/2.5/weather?q=Quebec,QC&units=metric
- http://wiki.fasterxml.com/JacksonInFiveMinutes
- http://www.json.org/java/index.html
Dans la classe com.sfragata.weather.test.OpenWeatherTest j'ai créé deux méthodes d'essai :
- testOpenweatherJackson : Comment utiliser l'API de jackson
- testOpenweatherJSON : Comment utiliser json.org l'API
J'ai utilisé les données d'OpenWeatherMap pour montrer comment transformer le json dans la classe Java (Jackson) et comment obtenir des données de json (json.org)