るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

キーワード

検索結果

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

This integer returns the current initial length of the buffer.

...
T
his integer returns the current initial length of the buffer....

JSON::State#buffer_initial_length=(length) (12217.0)

This sets the initial length of the buffer to length, if length > 0, otherwise its value isn't changed.

...
T
his sets the initial length of the buffer to length, if length > 0,
otherwise its value isn't changed....

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}
//}...

JSON::State#to_hash -> 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}
//}...

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

自身を初期化します。

...自身を初期化します。

@param options ハッシュを指定します。
指定可能なオプションは以下の通りです。

: :indent
インデントに使用する文字列を指定します。デフォルトは空文字列です。
: :space
JSON 形式の文字列のト...
...re
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の
前に挿入する文字列をセットします。デフォルトは空文字列です。
: :object_nl
JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入す...
...
: :buffer_initial_length
sets the initial length 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 を...

絞り込み条件を変える