vendored/puppet/lib/puppet/face/epp.rb in bolt-0.20.3 vs vendored/puppet/lib/puppet/face/epp.rb in bolt-0.20.5
- old
+ new
@@ -507,10 +507,10 @@
if fact_file
if fact_file.is_a?(Hash) # when used via the Face API
given_facts = fact_file
elsif fact_file.end_with?("json")
- given_facts = JSON.parse(Puppet::FileSystem.read(fact_file, :encoding => 'utf-8'))
+ given_facts = Puppet::Util::Json.load(Puppet::FileSystem.read(fact_file, :encoding => 'utf-8'))
else
given_facts = YAML.load(Puppet::FileSystem.read(fact_file, :encoding => 'utf-8'))
end
unless given_facts.instance_of?(Hash)