# File lib/puppet/external/pson/pure/generator.rb, line 298
298:           def to_pson(state = nil, depth = 0, *)
299:             if state
300:               state = PSON.state.from_state(state)
301:               state.check_max_nesting(depth)
302:               pson_check_circular(state) { pson_transform(state, depth) }
303:             else
304:               pson_transform(state, depth)
305:             end
306:           end