From a5a31f46097a7edab558525f918895396364b6b0 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Wed, 3 Aug 2011 13:11:01 -0500 Subject: [PATCH] Checking for NSJSONSerialization using NS_CLASS_AVAILABLE macro instead of NSClassFromString --- AFNetworking/AFJSONRequestOperation.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AFNetworking/AFJSONRequestOperation.m b/AFNetworking/AFJSONRequestOperation.m index 039b1f8..23a9e4e 100644 --- a/AFNetworking/AFJSONRequestOperation.m +++ b/AFNetworking/AFJSONRequestOperation.m @@ -62,8 +62,7 @@ } else { id JSON = nil; - Class NSJSONSerialization = NSClassFromString(@"NSJSONSerialization"); - if (NSJSONSerialization) { + if ([NSJSONSerialization class]) { JSON = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; } else { JSON = [[JSONDecoder decoder] objectWithData:data error:&error];