Я ищу, как разобрать данные, полученные с сайта JSON.Вот пример данных.
{ "weatherObservation":{
"clouds": "n/a",
"weatherCondition": "n/a",
"observation": "KIAD 181852Z 18005KT 10SM CLR 21/06 A2992 RMK AO2 SLP132 T02110056",
"windDirection": 180,
"ICAO": "KIAD",
"seaLevelPressure": 1013.2,
"elevation": 93,
"countryCode": "US",
"lng": -77.45,
"temperature": "21.1",
"dewPoint": "5.6",
"windSpeed": "05",
"humidity": 36,
"stationName": "Washington DC, Washington-Dulles International Airport",
"datetime": "2011-04-18 18:52:00",
"lat": 38.93333333333333 }}
Я хочу создать объект ИКАО со всеми этими данными и заполнить атрибуты вышеуказанным содержимым.
public class ICAO {
String clouds;
String weatherCondition;
String observation;
int windDirection;
String ICAOid;
int seaLevelPressure;
int elevation;
String countryCode;
double lng;
double temperature;
double dewpoint;
int windSpeed;
int humidity;
String stationName;
String date;
double lat;
public ICAO(String _clouds,String _weatherCondition,String _observation,int _windDirection,String _ICAOid,int _seaLevelPressure,int _elevation, String _countryCode,
double _lng, double _temperature, double _dewpoint, int _windSpeed, int _humidity, String _stationName, String _date, double _lat)
{
clouds = _clouds;
weatherCondition = _weatherCondition;
observation = _observation;
windDirection = _windDirection;
ICAOid = _ICAOid;
seaLevelPressure = _seaLevelPressure;
elevation = _elevation;
countryCode = _countryCode;
lng = _lng;
temperature = _temperature;
dewpoint = _dewpoint;
windSpeed = _windSpeed;
humidity = _humidity;
stationName = _stationName;
date = _date;
lat = _lat;
}