class Facter::Util::Parser::JsonParser

Public Instance Methods

parse_results() click to toggle source
# File lib/facter/util/parser.rb, line 103
def parse_results
  if Facter.json?
    JSON.load(content)
  else
    Facter.warnonce "Cannot parse JSON data file #{filename} without the json library."
    Facter.warnonce "Suggested next step is `gem install json` to install the json library."
    nil
  end
end