Method: Bibliothecary::MultiParsers::Spdx#parse_spdx_json

Defined in:
lib/bibliothecary/multi_parsers/spdx.rb

#parse_spdx_json(file_contents, options: {}) ⇒ Object

Raises:



100
101
102
103
104
105
106
107
108
# File 'lib/bibliothecary/multi_parsers/spdx.rb', line 100

def parse_spdx_json(file_contents, options: {})
  entries = try_cache(options, options[:filename]) do
    parse_spdx_json_file_contents(file_contents, options.fetch(:filename, nil))
  end

  raise NoEntries if entries.empty?

  entries[platform_name.to_sym]
end