るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Module.nesting -> [Class, Module] (24207.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 (12225.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#max_nesting=(depth) (12225.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) (12200.0)

JSON::NestingError (12000.0)

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

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

絞り込み条件を変える

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

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

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

...N::NaN, JSON::Infinity,
JSON::MinusInfinity を生成することもありません。

unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドで...
...dent
インデントに使用する文字列を指定します。デフォルトは空文字列です。
: :space
a string that is put after, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the...
...た場合、JSON::NaN, JSON::Infinity,
JSON::MinusInfinity を生成することを許すようになります。
偽を指定した場合、これらの値を生成しようとすると例外が発生します。
デフォルトは偽です。
: :max_nesting
入れ子になっているデ...

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

This integer returns the current depth of data structure nesting.

...
T
his integer returns the current depth of data structure nesting....

JSON::State#to_h -> Hash (6106.0)

自身をハッシュに変換します。

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

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# :depth=>0,
#...
...:buffer_initial_length=>1024}
//}...
<< 1 2 3 > >>