我有一個JSON對象,我希望得到的值: 實體>媒體>尺寸>大>^h獲取JSON對象節點
有沒有辦法得到它像XML - > Xpath的方法是什麼?
這是額外的線路是無關緊要的質疑只是因爲......
{
"created_at": "Sun, 01 Jan 2012 17:05:32 +0000",
"entities": {
"user_mentions": [
{
"screen_name": "nurdanterbiyik",
"name": "nurdan",
"id": 264782080,
"id_str": "264782080",
"indices": [
0,
15
]
}
],
"media": [
{
"id": 153522253777219584,
"id_str": "153522253777219584",
"indices": [
44,
64
],
"media_url": "http://p.twimg.com/AiFrrSmCMAAdEID.jpg",
"media_url_https": "https://p.twimg.com/AiFrrSmCMAAdEID.jpg",
"url": "http://t.co/ZwHN9gvO",
"display_url": "pic.twitter.com/ZwHN9gvO",
"expanded_url": "http://twitter.com/emelkiraac/status/153522253773025280/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 536,
"h": 800,
"resize": "fit"
},
使用JavascriptSerializer:你可以傳遞一個字符串並返回一個對象。從那裏訪問返回對象的屬性並獲取h。 – frenchie 2012-01-01 21:15:21
我剛試過。謝謝 – kankele 2012-01-01 22:15:21