るりまサーチ

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer times
  5. integer each_prime

ライブラリ

クラス

検索結果

JSON::State#max_nesting -> Integer (24327.0)

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

...ません。

//emlist[例 ネストの深さチェックを行う][ruby]{
require "json"

json_state = JSON::State.new(max_nesting: 2)
json_state.max_nesting # => 2
JSON.generate([[]], json_state)
JSON.generate([[[]]], json_state) # => JSON::NestingError
//}

//emlist[例 ネストの深...
...さチェックを行わない][ruby]{
require "json"

json_state = JSON::State.new(max_nesting: 0)
json_state.max_nesting # => 0
JSON.generate([[[[[[[[[[]]]]]]]]]], json_state)
//}...

JSON::State#depth=(depth) (6233.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.

...
T
his 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....