aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar dmaclach <dmaclach@gmail.com>2018-11-13 12:46:52 -0800
committerGravatar GitHub <noreply@github.com>2018-11-13 12:46:52 -0800
commit573a7d90f67f856546cccbfb7137360b4d7ba712 (patch)
tree5521e9658c90ca314032da798ff4d03cf28c6c71
parent85341176f85a73b94c1d785126d9e17c628287a3 (diff)
Deprecate GTMNSScanner+JSON (#199)
Use NSJSONSerialization instead.
-rw-r--r--Foundation/GTMNSScanner+JSON.h12
-rw-r--r--Foundation/GTMNSScanner+JSONTest.m6
2 files changed, 10 insertions, 8 deletions
diff --git a/Foundation/GTMNSScanner+JSON.h b/Foundation/GTMNSScanner+JSON.h
index 0ff8e65..553e3df 100644
--- a/Foundation/GTMNSScanner+JSON.h
+++ b/Foundation/GTMNSScanner+JSON.h
@@ -23,16 +23,12 @@
// Grabs the first JSON Object (dictionary) that it finds and returns it
// in jsonString. We don't parse the json, we just return the first valid JSON
-// dictionary we find. There are several other JSON parser packages that
-// will actually parse the json for you. We recommend json-framework
-// http://code.google.com/p/json-framework/
-- (BOOL)gtm_scanJSONObjectString:(NSString **)jsonString;
+// dictionary we find. Please use NSJSONSerialization instead.
+- (BOOL)gtm_scanJSONObjectString:(NSString **)jsonString NS_DEPRECATED(10_0, 10_7, 2_0, 5_0, "Use NSJSONSerialization instead");
// Grabs the first JSON Array (array) that it finds and returns it
// in jsonString. We don't parse the json, we just return the first valid JSON
-// array we find. There are several other JSON parser packages that
-// will actually parse the json for you. We recommend json-framework
-// http://code.google.com/p/json-framework/
-- (BOOL)gtm_scanJSONArrayString:(NSString**)jsonString;
+// array we find. Please use NSJSONSerialization instead.
+- (BOOL)gtm_scanJSONArrayString:(NSString**)jsonString NS_DEPRECATED(10_0, 10_7, 2_0, 5_0, "Use NSJSONSerialization instead");
@end
diff --git a/Foundation/GTMNSScanner+JSONTest.m b/Foundation/GTMNSScanner+JSONTest.m
index d78f41d..d888574 100644
--- a/Foundation/GTMNSScanner+JSONTest.m
+++ b/Foundation/GTMNSScanner+JSONTest.m
@@ -19,6 +19,10 @@
#import "GTMSenTestCase.h"
#import "GTMNSScanner+JSON.h"
+#pragma clang diagnostic push
+// Ignore all of the deprecation warnings for GTMNSScanner+JSON
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
@interface GTMNSScanner_JSONTest : GTMTestCase
@end
@@ -127,3 +131,5 @@ struct {
}
@end
+
+#pragma clang diagnostic pop