Method: PSON.parse
- Defined in:
- lib/puppet/external/pson/common.rb
.parse(source, opts = {}) ⇒ Object
Parse the PSON string source into a Ruby data structure and return it.
opts can have the following keys:
-
max_nesting: The maximum depth of nesting allowed in the parsed data structures. Disable depth checking with :max_nesting => false, it defaults to 19.
-
allow_nan: If set to true, allow NaN, Infinity and -Infinity in defiance of RFC 4627 to be parsed by the Parser. This option defaults to false.
124 125 126 |
# File 'lib/puppet/external/pson/common.rb', line 124 def parse(source, opts = {}) PSON.parser.new(source, opts).parse end |