{"action":"created","issue":{"url":"https://api.github.com/repos/CoderMJLee/MJExtension/issues/86","labels_url":"https://api.github.com/repos/CoderMJLee/MJExtension/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/CoderMJLee/MJExtension/issues/86/comments","events_url":"https://api.github.com/repos/CoderMJLee/MJExtension/issues/86/events","html_url":"https://github.com/CoderMJLee/MJExtension/issues/86","id":85148496,"number":86,"title":"无法解析","user":{"login":"100mango","id":5073511,"avatar_url":"https://avatars.githubusercontent.com/u/5073511?v=3","gravatar_id":"","url":"https://api.github.com/users/100mango","html_url":"https://github.com/100mango","followers_url":"https://api.github.com/users/100mango/followers","following_url":"https://api.github.com/users/100mango/following{/other_user}","gists_url":"https://api.github.com/users/100mango/gists{/gist_id}","starred_url":"https://api.github.com/users/100mango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/100mango/subscriptions","organizations_url":"https://api.github.com/users/100mango/orgs","repos_url":"https://api.github.com/users/100mango/repos","events_url":"https://api.github.com/users/100mango/events{/privacy}","received_events_url":"https://api.github.com/users/100mango/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-04T15:32:06Z","updated_at":"2015-06-04T16:32:30Z","closed_at":"2015-06-04T16:32:30Z","body":"\r\n恳请指教,不知道遗漏了哪一块。\r\n\r\n请求json数据\r\n\r\n~~~objective-c\r\n  [self.manager GET:@\"\" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {\r\n        \r\n        NSDictionary *json = (NSDictionary*)[responseObject objectForKey:@\"results\"];\r\n        WeatherSummary *weather = [WeatherSummary objectWithKeyValues:json];\r\n        \r\n        DLog(@\"%@\",json);\r\n        DLog(@\"%@\",weather);\r\n        \r\n    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {\r\n        NSLog(@\"%@\",error);\r\n    }];\r\n~~~\r\n \r\n 服务端json数据\r\n \r\n~~~javascript\r\n{\r\n    \"error\": 0,\r\n    \"status\": \"success\",\r\n    \"date\": \"2015-06-04\",\r\n    \"results\": [\r\n        {\r\n            \"currentCity\": \"北京\",\r\n            \"pm25\": \"80\",\r\n            \"index\": [\r\n                {\r\n                    \"title\": \"穿衣\",\r\n                    \"zs\": \"炎热\",\r\n                    \"tipt\": \"穿衣指数\",\r\n                    \"des\": \"天气炎热，建议着短衫、短裙、短裤、薄型T恤衫等清凉夏季服装。\"\r\n                },\r\n                {\r\n                    \"title\": \"洗车\",\r\n                    \"zs\": \"较适宜\",\r\n                    \"tipt\": \"洗车指数\",\r\n                    \"des\": \"较适宜洗车，未来一天无雨，风力较小，擦洗一新的汽车至少能保持一天。\"\r\n                },\r\n                {\r\n                    \"title\": \"旅游\",\r\n                    \"zs\": \"适宜\",\r\n                    \"tipt\": \"旅游指数\",\r\n                    \"des\": \"天气较好，但稍感觉有些热，不过还是个好天气哦。适宜旅游，可不要错过机会呦！\"\r\n                },\r\n                {\r\n                    \"title\": \"感冒\",\r\n                    \"zs\": \"少发\",\r\n                    \"tipt\": \"感冒指数\",\r\n                    \"des\": \"各项气象条件适宜，发生感冒机率较低。但请避免长期处于空调房间中，以防感冒。\"\r\n                },\r\n                {\r\n                    \"title\": \"运动\",\r\n                    \"zs\": \"较适宜\",\r\n                    \"tipt\": \"运动指数\",\r\n                    \"des\": \"天气较好，户外运动请注意防晒，推荐您在室内进行低强度运动。\"\r\n                },\r\n                {\r\n                    \"title\": \"紫外线强度\",\r\n                    \"zs\": \"强\",\r\n                    \"tipt\": \"紫外线强度指数\",\r\n                    \"des\": \"紫外线辐射强，建议涂擦SPF20左右、PA++的防晒护肤品。避免在10点至14点暴露于日光下。\"\r\n                }\r\n            ],\r\n            \"weather_data\": [\r\n                {\r\n                    \"date\": \"周四 06月04日 (实时：20℃)\",\r\n                    \"dayPictureUrl\": \"http://api.map.baidu.com/images/weather/day/yin.png\",\r\n                    \"nightPictureUrl\": \"http://api.map.baidu.com/images/weather/night/yin.png\",\r\n                    \"weather\": \"阴\",\r\n                    \"wind\": \"微风\",\r\n                    \"temperature\": \"17℃\"\r\n                },\r\n                {\r\n                    \"date\": \"周五\",\r\n                    \"dayPictureUrl\": \"http://api.map.baidu.com/images/weather/day/qing.png\",\r\n                    \"nightPictureUrl\": \"http://api.map.baidu.com/images/weather/night/yin.png\",\r\n                    \"weather\": \"晴转阴\",\r\n                    \"wind\": \"微风\",\r\n                    \"temperature\": \"32 ~ 20℃\"\r\n                },\r\n                {\r\n                    \"date\": \"周六\",\r\n                    \"dayPictureUrl\": \"http://api.map.baidu.com/images/weather/day/yin.png\",\r\n                    \"nightPictureUrl\": \"http://api.map.baidu.com/images/weather/night/duoyun.png\",\r\n                    \"weather\": \"阴转多云\",\r\n                    \"wind\": \"微风\",\r\n                    \"temperature\": \"32 ~ 20℃\"\r\n                },\r\n                {\r\n                    \"date\": \"周日\",\r\n                    \"dayPictureUrl\": \"http://api.map.baidu.com/images/weather/day/yin.png\",\r\n                    \"nightPictureUrl\": \"http://api.map.baidu.com/images/weather/night/yin.png\",\r\n                    \"weather\": \"阴\",\r\n                    \"wind\": \"微风\",\r\n                    \"temperature\": \"30 ~ 19℃\"\r\n                }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n~~~\r\n \r\njson打印：\r\n\r\n~~~\r\n  {\r\n        currentCity = \"\\U5317\\U4eac\";\r\n        index =         (\r\n                        {\r\n                des = \"\\U5929\\U6c14\\U708e\\U70ed\\Uff0c\\U5efa\\U8bae\\U7740\\U77ed\\U886b\\U3001\\U77ed\\U88d9\\U3001\\U77ed\\U88e4\\U3001\\U8584\\U578bT\\U6064\\U886b\\U7b49\\U6e05\\U51c9\\U590f\\U5b63\\U670d\\U88c5\\U3002\";\r\n                tipt = \"\\U7a7f\\U8863\\U6307\\U6570\";\r\n                title = \"\\U7a7f\\U8863\";\r\n                zs = \"\\U708e\\U70ed\";\r\n            },\r\n                        {\r\n                des = \"\\U8f83\\U9002\\U5b9c\\U6d17\\U8f66\\Uff0c\\U672a\\U6765\\U4e00\\U5929\\U65e0\\U96e8\\Uff0c\\U98ce\\U529b\\U8f83\\U5c0f\\Uff0c\\U64e6\\U6d17\\U4e00\\U65b0\\U7684\\U6c7d\\U8f66\\U81f3\\U5c11\\U80fd\\U4fdd\\U6301\\U4e00\\U5929\\U3002\";\r\n                tipt = \"\\U6d17\\U8f66\\U6307\\U6570\";\r\n                title = \"\\U6d17\\U8f66\";\r\n                zs = \"\\U8f83\\U9002\\U5b9c\";\r\n            },\r\n                        {\r\n                des = \"\\U5929\\U6c14\\U8f83\\U597d\\Uff0c\\U4f46\\U7a0d\\U611f\\U89c9\\U6709\\U4e9b\\U70ed\\Uff0c\\U4e0d\\U8fc7\\U8fd8\\U662f\\U4e2a\\U597d\\U5929\\U6c14\\U54e6\\U3002\\U9002\\U5b9c\\U65c5\\U6e38\\Uff0c\\U53ef\\U4e0d\\U8981\\U9519\\U8fc7\\U673a\\U4f1a\\U5466\\Uff01\";\r\n                tipt = \"\\U65c5\\U6e38\\U6307\\U6570\";\r\n                title = \"\\U65c5\\U6e38\";\r\n                zs = \"\\U9002\\U5b9c\";\r\n            },\r\n                        {\r\n                des = \"\\U5404\\U9879\\U6c14\\U8c61\\U6761\\U4ef6\\U9002\\U5b9c\\Uff0c\\U53d1\\U751f\\U611f\\U5192\\U673a\\U7387\\U8f83\\U4f4e\\U3002\\U4f46\\U8bf7\\U907f\\U514d\\U957f\\U671f\\U5904\\U4e8e\\U7a7a\\U8c03\\U623f\\U95f4\\U4e2d\\Uff0c\\U4ee5\\U9632\\U611f\\U5192\\U3002\";\r\n                tipt = \"\\U611f\\U5192\\U6307\\U6570\";\r\n                title = \"\\U611f\\U5192\";\r\n                zs = \"\\U5c11\\U53d1\";\r\n            },\r\n                        {\r\n                des = \"\\U5929\\U6c14\\U8f83\\U597d\\Uff0c\\U6237\\U5916\\U8fd0\\U52a8\\U8bf7\\U6ce8\\U610f\\U9632\\U6652\\Uff0c\\U63a8\\U8350\\U60a8\\U5728\\U5ba4\\U5185\\U8fdb\\U884c\\U4f4e\\U5f3a\\U5ea6\\U8fd0\\U52a8\\U3002\";\r\n                tipt = \"\\U8fd0\\U52a8\\U6307\\U6570\";\r\n                title = \"\\U8fd0\\U52a8\";\r\n                zs = \"\\U8f83\\U9002\\U5b9c\";\r\n            },\r\n                        {\r\n                des = \"\\U7d2b\\U5916\\U7ebf\\U8f90\\U5c04\\U5f3a\\Uff0c\\U5efa\\U8bae\\U6d82\\U64e6SPF20\\U5de6\\U53f3\\U3001PA++\\U7684\\U9632\\U6652\\U62a4\\U80a4\\U54c1\\U3002\\U907f\\U514d\\U572810\\U70b9\\U81f314\\U70b9\\U66b4\\U9732\\U4e8e\\U65e5\\U5149\\U4e0b\\U3002\";\r\n                tipt = \"\\U7d2b\\U5916\\U7ebf\\U5f3a\\U5ea6\\U6307\\U6570\";\r\n                title = \"\\U7d2b\\U5916\\U7ebf\\U5f3a\\U5ea6\";\r\n                zs = \"\\U5f3a\";\r\n            }\r\n        );\r\n        pm25 = 88;\r\n        \"weather_data\" =         (\r\n                        {\r\n                date = \"\\U5468\\U56db 06\\U670804\\U65e5 (\\U5b9e\\U65f6\\Uff1a18\\U2103)\";\r\n                dayPictureUrl = \"http://api.map.baidu.com/images/weather/day/yin.png\";\r\n                nightPictureUrl = \"http://api.map.baidu.com/images/weather/night/yin.png\";\r\n                temperature = \"17\\U2103\";\r\n                weather = \"\\U9634\";\r\n                wind = \"\\U5fae\\U98ce\";\r\n            },\r\n                        {\r\n                date = \"\\U5468\\U4e94\";\r\n                dayPictureUrl = \"http://api.map.baidu.com/images/weather/day/qing.png\";\r\n                nightPictureUrl = \"http://api.map.baidu.com/images/weather/night/yin.png\";\r\n                temperature = \"32 ~ 20\\U2103\";\r\n                weather = \"\\U6674\\U8f6c\\U9634\";\r\n                wind = \"\\U5fae\\U98ce\";\r\n            },\r\n                        {\r\n                date = \"\\U5468\\U516d\";\r\n                dayPictureUrl = \"http://api.map.baidu.com/images/weather/day/yin.png\";\r\n                nightPictureUrl = \"http://api.map.baidu.com/images/weather/night/duoyun.png\";\r\n                temperature = \"32 ~ 20\\U2103\";\r\n                weather = \"\\U9634\\U8f6c\\U591a\\U4e91\";\r\n                wind = \"\\U5fae\\U98ce\";\r\n            },\r\n                        {\r\n                date = \"\\U5468\\U65e5\";\r\n                dayPictureUrl = \"http://api.map.baidu.com/images/weather/day/yin.png\";\r\n                nightPictureUrl = \"http://api.map.baidu.com/images/weather/night/yin.png\";\r\n                temperature = \"30 ~ 19\\U2103\";\r\n                weather = \"\\U9634\";\r\n                wind = \"\\U5fae\\U98ce\";\r\n            }\r\n        );\r\n    }\r\n)\r\n~~~\r\n\r\nweather打印：\r\n\r\n~~~\r\nWeatherSummary <\r\n  pm25 = nil,\r\n  currentCity = nil,\r\n  index = nil,\r\n  weatherData = nil\r\n>\r\n~~~\r\n\r\n\r\n\r\nweatherSummary结构：\r\n\r\n~~~objective-c\r\n.h\r\n\r\n#import <Foundation/Foundation.h>\r\n#import \"MJExtension.h\"\r\n#import \"WeatherData.h\"\r\n#import \"WeatherIndex.h\"\r\n\r\n@interface WeatherSummary : NSObject\r\n\r\n@property (copy,nonatomic) NSString *pm25;\r\n@property (copy,nonatomic) NSString *currentCity;\r\n@property (strong,nonatomic) NSArray *index;\r\n@property (strong,nonatomic) NSArray *weatherData;\r\n\r\n@end\r\n\r\n.m\r\n\r\n+ (NSDictionary *)objectClassInArray\r\n{\r\n    return @{@\"index\":@\"WeatherIndex\",@\"weatherData\":@\"WeatherData\"};\r\n}\r\n\r\n+ (NSDictionary *)replacedKeyFromPropertyName\r\n{\r\n    return @{@\"weatherData\":@\"weather_data\"};\r\n}\r\n~~~\r\n\r\n\r\nweatherData\r\n\r\n~~~objective-c\r\n@interface WeatherData : NSObject\r\n\r\n@property (copy,nonatomic) NSString *date;\r\n@property (copy,nonatomic) NSString *dayPictureUrl;\r\n@property (copy,nonatomic) NSString *nightPictureUrl;\r\n@property (copy,nonatomic) NSString *weather;\r\n@property (copy,nonatomic) NSString *temperature;\r\n~~~\r\n\r\n\r\n\r\nweatherIndex\r\n\r\n~~~objective-c\r\n\r\n@interface WeatherIndex : NSObject\r\n\r\n@property (copy,nonatomic) NSString *title;\r\n@property (copy,nonatomic) NSString *zs;\r\n@property (copy,nonatomic) NSString *tipt;\r\n@property (copy,nonatomic) NSString *des;\r\n\r\n\r\n@end\r\n~~~"},"comment":{"url":"https://api.github.com/repos/CoderMJLee/MJExtension/issues/comments/108958730","html_url":"https://github.com/CoderMJLee/MJExtension/issues/86#issuecomment-108958730","issue_url":"https://api.github.com/repos/CoderMJLee/MJExtension/issues/86","id":108958730,"user":{"login":"100mango","id":5073511,"avatar_url":"https://avatars.githubusercontent.com/u/5073511?v=3","gravatar_id":"","url":"https://api.github.com/users/100mango","html_url":"https://github.com/100mango","followers_url":"https://api.github.com/users/100mango/followers","following_url":"https://api.github.com/users/100mango/following{/other_user}","gists_url":"https://api.github.com/users/100mango/gists{/gist_id}","starred_url":"https://api.github.com/users/100mango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/100mango/subscriptions","organizations_url":"https://api.github.com/users/100mango/orgs","repos_url":"https://api.github.com/users/100mango/repos","events_url":"https://api.github.com/users/100mango/events{/privacy}","received_events_url":"https://api.github.com/users/100mango/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T16:32:30Z","updated_at":"2015-06-04T16:32:30Z","body":"感谢。是我的疏漏。没有注意到json结构阅览好。我看了一下MJExtension没有自动填充description功能。所以去搜索了一下相关资料与项目。希望能够到时能为MJExtension添砖加瓦。感谢~"}}