るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.216秒)

別のキーワード

  1. _builtin max
  2. enumerable max
  3. enumerable max_by
  4. _builtin max_by
  5. range max

ライブラリ

クラス

検索結果

JSON::State#max_nesting=(depth) (21107.0)

生成される JSON 形式の文字列のネストの深さの最大値をセットします。

...生成される JSON 形式の文字列のネストの深さの最大値をセットします。

この値にゼロをセットすると、ネストの深さのチェックを行いません。

//emlist[例][ruby]{
require "json"

j
son_state = JSON::State.new(max_nesting: 2)
j
son_state.max_nestin...
...g # => 2
J
SON.generate([[]], json_state)
j
son_state.max_nesting = 3
j
son_state.max_nesting # => 3
J
SON.generate([[[[]]]], json_state) # => JSON::NestingError
//}...

JSON::State#depth=(depth) (3017.0)

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.

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