# File lib/puppet/external/pson/pure/generator.rb, line 270
270:           def to_pson(state = nil, depth = 0, *)
271:             if state
272:               state = PSON.state.from_state(state)
273:               state.check_max_nesting(depth)
274:               pson_check_circular(state) { pson_transform(state, depth) }
275:             else
276:               pson_transform(state, depth)
277:             end
278:           end