# File lib/puppet/external/pson/pure/generator.rb, line 236
236:           def to_pson(state = nil, depth = 0, *)
237:             if state
238:               state = PSON.state.from_state(state)
239:               state.check_max_nesting(depth)
240:               pson_check_circular(state) { pson_transform(state, depth) }
241:             else
242:               pson_transform(state, depth)
243:             end
244:           end