|
|
|
GSON и парсинг строги
|
|||
|---|---|---|---|
|
#18+
Как отпарсить строку с помощю GSON ? есть строка "{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"94\", \"observation_time\": \"12:51 PM\", \"precipMM\": \"2.6\", \"pressure\": \"996\", \"temp_C\": \"10\", \"temp_F\": \"50\", \"visibility\": \"10\", \"weatherCode\": \"296\", \"weatherDesc\": [ {\"value\": \"Light rain\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/cdn.worldweatheronline.net\\/images\\/wsymbols01_png_64\\/wsymbol_0017_cloudy_with_light_rain.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"windspeedKmph\": \"15\", \"windspeedMiles\": \"9\" } ], \"request\": [ {\"query\": \"Lat 48.85 and Lon 2.35\", \"type\": \"LatLon\" } ] }}" как отсюда вытащить observation_time и temp_C ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.11.2013, 16:59:20 |
|
||
|
GSON и парсинг строги
|
|||
|---|---|---|---|
|
#18+
точнее вот норм строка { "data": { "current_condition": [ {"cloudcover": "100", "humidity": "94", "observation_time": "01:06 PM", "precipMM": "2.6", "pressure": "996", "temp_C": "10", "temp_F": "50", "visibility": "10", "weatherCode": "296", "weatherDesc": [ {"value": "Light rain" } ], "weatherIconUrl": [ {"value": "http:\/\/cdn.worldweatheronline.net\/images\/wsymbols01_png_64\/wsymbol_0017_cloudy_with_light_rain.png" } ], "winddir16Point": "SSW", "winddirDegree": "210", "windspeedKmph": "15", "windspeedMiles": "9" } ], "request": [ {"query": "Lat 48.85 and Lon 2.35", "type": "LatLon" } ] }} ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.11.2013, 17:07:10 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=38453387&tid=2128275]: |
0ms |
get settings: |
7ms |
get forum list: |
20ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
210ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
56ms |
get tp. blocked users: |
2ms |
| others: | 214ms |
| total: | 532ms |

| 0 / 0 |
