4件ヒット
[1-4件を表示]
(0.082秒)
クラス
-
JSON
:: State (3) - Regexp (1)
キーワード
- depth (1)
- depth= (1)
-
max
_ nesting= (1) -
to
_ json (1)
検索結果
先頭4件
-
JSON
:: State # depth=(depth) (37210.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 # depth -> Integer (36610.0) -
This integer returns the current depth of data structure nesting.
This integer returns the current depth of data structure nesting. -
Regexp
# to _ json(*args) -> String (9115.0) -
自身を JSON 形式の文字列に変換して返します。
...を JSON 形式の文字列に変換して返します。
内部的にはハッシュにデータをセットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数には何の意味もありません。
//emlist[例][ruby]{
require "json/add....../core"
/0\d{1,4}-\d{1,4}-\d{4}/.to_json # => "{\"json_class\":\"Regexp\",\"o\":0,\"s\":\"0\\\\d{1,4}-\\\\d{1,4}-\\\\d{4}\"}"
//}... -
JSON
:: State # max _ nesting=(depth) (610.0) -
生成される JSON 形式の文字列のネストの深さの最大値をセットします。
...生成される JSON 形式の文字列のネストの深さの最大値をセットします。
この値にゼロをセットすると、ネストの深さのチェックを行いません。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(max_nesting: 2)
json_state.max_nestin......g # => 2
JSON.generate([[]], json_state)
json_state.max_nesting = 3
json_state.max_nesting # => 3
JSON.generate([[[[]]]], json_state) # => JSON::NestingError
//}...