るりまサーチ

最速Rubyリファレンスマニュアル検索!
55件ヒット [1-55件を表示] (0.018秒)

別のキーワード

  1. _builtin length
  2. csv length
  3. dbm length
  4. set length
  5. rss length

クラス

キーワード

検索結果

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

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

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

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

This integer returns the current initial length of the buffer.

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

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

自身を初期化します。

...字列を指定します。デフォルトは空文字列です。
: :space
JSON
形式の文字列のトークン間に挿入する文字列を指定します。デフォルトは空文字列です。
: :space_before
JSON
形式の文字列中で JavaScript のオブジェクトを表す部分...
...。デフォルトは空文字列です。
: :object_nl
JSON
形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を指定します。
デフォルトは空文字列です。
: :array_nl
JSON
形式の文字列中に現れる JavaScript の配列...
...いて JSON 形式の文字列を生成します。
デフォルトは偽です。
: :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...

JSON::State#to_h -> Hash (8.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 (8.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=>...

絞り込み条件を変える