# File lib/json/pure/generator.rb, line 250 def to_json(state = nil, depth = 0, *) if state state = State.from_state(state) state.check_max_nesting(depth) end json_transform(state, depth) end