Skip to content

Commit

Permalink
修复#1
Browse files Browse the repository at this point in the history
  • Loading branch information
coderyi committed Nov 7, 2015
1 parent 4c46619 commit 9905e32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NetworkEye/NetworkEye/NEHTTPEye.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ -(id) responseJSON {
if(error){
NSLog(@"JSON Parsing Error: %@", error);
}
//https://github.com/coderyi/NetworkEye/issues/1
if (!returnValue || returnValue == [NSNull null]) {
return nil;
}
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:returnValue options:NSJSONWritingPrettyPrinted error:nil];
NSString *jsonString = [[NSString alloc]initWithData:jsonData encoding:NSUTF8StringEncoding];
return jsonString;
Expand Down

0 comments on commit 9905e32

Please sign in to comment.