るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

JSON::State#buffer_initial_length -> Integer (117.0)

This integer returns the current initial length of the buffer.

...This integer returns the current initial length of the buffer....

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

This integer returns the current depth of data structure nesting.

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

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

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

...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]{
require "json"

a = [[[[[[[[[[[[[[[[[[[[[[[[[...

JSON::State.new(options = {}) -> JSON::State (107.0)

自身を初期化します。

... of the generator's internal buffer.

//emlist[例 Hash を指定][ruby]{
require "json"

json_state = JSON::State.new(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}

//emlist[例 JSON::State を指定][ruby]{
require "json"

json_state = JSON::State...
....new(indent: "\t")
copy = JSON::State.new(json_state)
copy.class # => JSON::Ext::Generator::State
copy.indent # => "\t"
//}...