るりまサーチ

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

クラス

モジュール

キーワード

検索結果

JSON::State#to_hash -> Hash (15113.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,
#...

NEWS for Ruby 2.0.0 (6120.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...のメソッドに対応します

* Array
* 追加: Array#bsearch 二分探索します
* 非互換:
* Array#shuffle! と Array#sample の random パラメータには最大値のみを指定することが可能になりました
* Array#values_at に Range オブジェクト...
...めのメソッドです
* 拡張: Enumerator.new サイズの遅延評価のための引数を一つ受け取るようになりました
* 新規クラス: Enumerator::Lazy 遅延列挙用のクラス

* ENV
* ENV.to_h は ENV.to_hash へのエイリアスです

* Fiber
* 非...

JSON.#generate(object, state = nil) -> String (24.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できます。
ハッシュを使用する場合指定...
...before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指定した場合、生成するオブジェクトの循環をチェックし...
...][ruby]{
require "json"

JSON.generate([1, 2, { name: "tanaka", age: 19 }])
# => "[1,2,{\"name\":\"tanaka\",\"age\":19}]"
json_state = JSON::State.new(space: " ")
JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => "[1,2,{\"name\": \"tanaka\",\"age\": 19}]"
//}

@see JSON::State, JSO...

JSON.#unparse(object, state = nil) -> String (24.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できます。
ハッシュを使用する場合指定...
...before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指定した場合、生成するオブジェクトの循環をチェックし...
...][ruby]{
require "json"

JSON.generate([1, 2, { name: "tanaka", age: 19 }])
# => "[1,2,{\"name\":\"tanaka\",\"age\":19}]"
json_state = JSON::State.new(space: " ")
JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => "[1,2,{\"name\": \"tanaka\",\"age\": 19}]"
//}

@see JSON::State, JSO...

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

絞り込み条件を変える