44件ヒット
[1-44件を表示]
(0.055秒)
種類
- インスタンスメソッド (33)
- 特異メソッド (11)
ライブラリ
- json (44)
キーワード
-
buffer
_ initial _ length (11) -
check
_ circular? (11) - depth (11)
- new (11)
検索結果
先頭4件
-
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"
//}...