Returns a PSON string containing a PSON object, that is unparsed from this Hash instance. state is a PSON::State object, that can also be used to configure the produced PSON string output further. depth is used to find out nesting depth, to indent accordingly.
# File lib/puppet/external/pson/pure/generator.rb, line 208 def to_pson(state = nil, depth = 0, *) if state state = PSON.state.from_state(state) state.check_max_nesting(depth) pson_check_circular(state) { pson_transform(state, depth) } else pson_transform(state, depth) end end