Method: FeedParser::Parser#is_json?

Defined in:
lib/feedparser/parser.rb

#is_json?Boolean Also known as: json?

Returns:

  • (Boolean)

37
38
39
40
41
42
# File 'lib/feedparser/parser.rb', line 37

def is_json?
  ## check if starts with { for json object/hash
  ##    or if includes jsonfeed prolog
  @head.start_with?( '{' ) ||
  @head =~ JSONFEED_VERSION_RE
end