summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNan Liu <nan@puppetlabs.com>2011-10-25 15:54:47 -0700
committerNan Liu <nan@puppetlabs.com>2011-10-25 15:54:47 -0700
commitb58810089f783205ffdb840dc254a1d3e9f84b88 (patch)
tree1a8a04ced18c97b45b847f6697f34ad1321e24de
parentd65fafd7ef17b7c80f121ca56a3e87ce39947775 (diff)
downloadpuppet-stdlib-b58810089f783205ffdb840dc254a1d3e9f84b88.tar.gz
puppet-stdlib-b58810089f783205ffdb840dc254a1d3e9f84b88.tar.bz2
(#10285) Refactor json to use pson instead.
Remove json requirement since puppet already provides pson which is equivalent.
-rw-r--r--lib/puppet/parser/functions/parsejson.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/puppet/parser/functions/parsejson.rb b/lib/puppet/parser/functions/parsejson.rb
index cf3b12c..a9a16a4 100644
--- a/lib/puppet/parser/functions/parsejson.rb
+++ b/lib/puppet/parser/functions/parsejson.rb
@@ -15,11 +15,9 @@ structure.
end
json = arguments[0]
-
- require 'json'
-
- JSON.load(json)
+ # PSON is natively available in puppet
+ PSON.load(json)
end
end