るりまサーチ

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

別のキーワード

  1. module nesting
  2. _builtin nesting
  3. json max_nesting
  4. state max_nesting
  5. json max_nesting=

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

Module.nesting -> [Class, Module] (18107.0)

このメソッドを呼び出した時点でのクラス/モジュールのネスト情 報を配列に入れて返します。

...このメソッドを呼び出した時点でのクラス/モジュールのネスト情
報を配列に入れて返します。

//emlist[例][ruby]{
module Foo
module Bar
module Baz
p Module.nesting # => [Foo::Bar::Baz, Foo::Bar, Foo]
end
end
end
//}...

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

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

..._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...

JSON::State#max_nesting=(depth) (6125.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
//}...

static VALUE rb_mod_nesting(void) (6100.0)

JSON::NestingError (6000.0)

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

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

絞り込み条件を変える

JSON::State#depth=(depth) (32.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
JSON to the integer depth, max_nesting = 0 if no maximum should be
checked....

JSON::State#check_circular? -> bool (24.0)

循環参照のチェックを行う場合は、真を返します。 そうでない場合は偽を返します。

...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
s = JSON.state.new
begin
JSON.generate(a, s)
rescue JSON::NestingError => e
[e, s.max_nesting, s.check_circular?] # => [#<JSON::NestingError: nesting of 100 is too deep>, 100, true]
end
//}

//emlist[例 ネストをチェックしないケース][ruby...
...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
s2 = JSON.state.new(max_nesting: 0)
json = JSON.generate(a, s2)
[json, s2.max_nesting, s2.check_circular?] # => ["[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...

JSON::State#depth -> Integer (16.0)

This integer returns the current depth of data structure nesting.

...This integer returns the current depth of data structure nesting....

JSON.#generate(object, state = nil) -> String (6.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...
偽を指定した場合、これらの値を生成しようとすると例外が発生します。
デフォルトは偽です。
: :max_nesting
入れ子になっているデータの最大の深さを指定します。
偽を指定すると深さのチェックを行いません。デ...

JSON.#load(source, proc = nil, options = {}) -> object (6.0)

与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。

...します。

@param options オプションをハッシュで指定します。指定可能なオプションは以下の通りです。

: :max_nesting
入れ子になっているデータの最大の深さを指定します。
偽を指定すると深さのチェックを行いません。デ...

絞り込み条件を変える

<< 1 2 > >>