From fce95bb5b67c8427e90d2f60c41423a2d6034e0b Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 25 Nov 2017 16:48:13 -0800 Subject: [PATCH] Pull JSON feed from web page metadata (along with RSS and Atom, which already worked). --- Frameworks/RSParser/HTML/RSHTMLMetadata.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Frameworks/RSParser/HTML/RSHTMLMetadata.m b/Frameworks/RSParser/HTML/RSHTMLMetadata.m index e07a244d1..2cb5ec0b0 100755 --- a/Frameworks/RSParser/HTML/RSHTMLMetadata.m +++ b/Frameworks/RSParser/HTML/RSHTMLMetadata.m @@ -28,6 +28,7 @@ static NSString *kRelKey = @"rel"; static NSString *kAlternateKey = @"alternate"; static NSString *kRSSSuffix = @"/rss+xml"; static NSString *kAtomSuffix = @"/atom+xml"; +static NSString *kJSONSuffix = @"/json"; static NSString *kTypeKey = @"type"; @interface RSHTMLMetadataAppleTouchIcon () @@ -202,7 +203,7 @@ static NSArray *objectsOfClassWithDictionaries(Class class, NSArray *dictionarie static BOOL typeIsFeedType(NSString *type) { type = type.lowercaseString; - return [type hasSuffix:kRSSSuffix] || [type hasSuffix:kAtomSuffix]; + return [type hasSuffix:kRSSSuffix] || [type hasSuffix:kAtomSuffix] || [type hasSuffix:kJSONSuffix]; }