るりまサーチ

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

別のキーワード

  1. array fill
  2. array []
  3. array sample
  4. array new
  5. array []=

ライブラリ

クラス

キーワード

検索結果

JSON::State#array_nl -> String (18120.0)

JSON の配列の後に出力する文字列を返します。

...JSON の配列の後に出力する文字列を返します。

//emlist[例][ruby]{
require "json"

json_state = JSON::State.new({})
json_state.array_nl # => ""
json_state = JSON::State.new(array_nl: "\n")
json_state.array_nl # => "\n"
//}...

JSON::State#array_nl=(str) (6120.0)

JSON の配列の後に出力する文字列をセットします。

...JSON の配列の後に出力する文字列をセットします。

//emlist[例][ruby]{
require "json"

json_state = JSON::State.new({})
json_state.array_nl # => ""
json_state.array_nl = "\n"
json_state.array_nl # => "\n"
//}...

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

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

...quire "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 (7.0)

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

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