204件ヒット
[1-100件を表示]
(0.101秒)
種類
- インスタンスメソッド (84)
- モジュール関数 (72)
- 特異メソッド (24)
- クラス (12)
- 関数 (12)
クラス
-
JSON
:: Parser (12) -
JSON
:: State (84) - Module (12)
モジュール
- JSON (72)
キーワード
- NestingError (12)
-
check
_ circular? (12) - depth (12)
- depth= (12)
- generate (12)
- load (12)
-
max
_ nesting (12) -
max
_ nesting= (12) - new (12)
- parse (12)
- parse! (12)
-
rb
_ mod _ nesting (12) - restore (12)
-
to
_ h (12) -
to
_ hash (12) - unparse (12)
検索結果
先頭5件
-
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.
...
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
. # 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.
...
This 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}
//}...