るりまサーチ

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

別のキーワード

  1. json depth
  2. json depth=
  3. state depth
  4. state depth=
  5. http verify_depth

ライブラリ

キーワード

検索結果

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

This integer returns the current depth of data structure nesting.

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

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

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

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

...e "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=>...

JSON::State#to_hash -> Hash (7.0)

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

...e "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=>...

絞り込み条件を変える