Method: PSON.fast_generate
- Defined in:
- lib/puppet/external/pson/common.rb
.fast_generate(obj) ⇒ Object Also known as: fast_unparse
Unparse the Ruby data structure obj into a single line PSON string and return it. This method disables the checks for circles in Ruby objects, and also generates NaN, Infinity, and, -Infinity float values.
WARNING: Be careful not to pass any Ruby data structures with circles as obj argument, because this will cause PSON to go into an infinite loop.
199 200 201 |
# File 'lib/puppet/external/pson/common.rb', line 199 def fast_generate(obj) obj.to_pson(nil) end |