るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.046秒)
トップページ > クエリ:g[x] > クエリ:NestingError[x]

別のキーワード

  1. openssl g=
  2. openssl g
  3. dsa g
  4. dsa g=
  5. dh g

ライブラリ

クラス

キーワード

検索結果

JSON::NestingError (24000.0)

パースしようとしているデータ構造のネストが深すぎる場合に発生する例外です。

パースしようとしているデータ構造のネストが深すぎる場合に発生する例外です。

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

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

...sting: 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#max_nesting=(depth) (6106.0)

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

...せん。

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

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