るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. bigdecimal to_r
  5. fileutils rm_r

ライブラリ

クラス

モジュール

キーワード

検索結果

JSON::State#quirks_mode -> bool (24302.0)

Returns true, if quirks mode is enabled. Otherwise returns false.

...
R
eturns true, if quirks mode is enabled. Otherwise returns false....

JSON::State#quirks_mode? -> bool (12302.0)

Returns true, if quirks mode is enabled. Otherwise returns false.

...
R
eturns true, if quirks mode is enabled. Otherwise returns false....

JSON.#restore(source, proc = nil, options = {}) -> object (6306.0)

与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。

... Ruby オブジェクトとしてロードして返します。

proc として手続きオブジェクトが与えられた場合は、読み込んだオブジェクトを
引数にその手続きを呼び出します。


r
equire 'json'

str=<<JSON
[1,2,3]
JSON

JSON.load(str) # =...
...> [1,2,3]
JSON.load(str, proc{|v| p v }) # => [1,2,3]
# 以下が表示される
# 1
# 2
# 3
# [1,2,3]

str=<<JSON
{ "a":1, "b":2, "c":3 }
JSON

JSON.load(str) # => {"a"=>1, "b"=>2, "c"=>3}
JSON.load(str, proc{|v| p v }) # => {"a"=>1, "b"=>2, "c"=>3}
# 以下が表示さ...
..."c"
# 3
# {"a"=>1, "b"=>2, "c"=>3}

@param source JSON 形式の文字列を指定します。他には、to_str, to_io, read メソッドを持つオブジェクトも指定可能です。

@param proc Proc オブジェクトを指定します。

@param options オプションをハッシュ...

JSON.#load(source, proc = nil, options = {}) -> object (206.0)

与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。

... Ruby オブジェクトとしてロードして返します。

proc として手続きオブジェクトが与えられた場合は、読み込んだオブジェクトを
引数にその手続きを呼び出します。


r
equire 'json'

str=<<JSON
[1,2,3]
JSON

JSON.load(str) # =...
...> [1,2,3]
JSON.load(str, proc{|v| p v }) # => [1,2,3]
# 以下が表示される
# 1
# 2
# 3
# [1,2,3]

str=<<JSON
{ "a":1, "b":2, "c":3 }
JSON

JSON.load(str) # => {"a"=>1, "b"=>2, "c"=>3}
JSON.load(str, proc{|v| p v }) # => {"a"=>1, "b"=>2, "c"=>3}
# 以下が表示さ...
..."c"
# 3
# {"a"=>1, "b"=>2, "c"=>3}

@param source JSON 形式の文字列を指定します。他には、to_str, to_io, read メソッドを持つオブジェクトも指定可能です。

@param proc Proc オブジェクトを指定します。

@param options オプションをハッシュ...