このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 2.3.0 リファレンスマニュアル

instance method JSON::State#depth=

depth=(depth)[permalink][rdoc]

This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.