るりまサーチ

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception
  5. socket udp_server_loop_on

ライブラリ

クラス

モジュール

キーワード

検索結果

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

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

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

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

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

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

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

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

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

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


require '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}...
...# {"a"=>1, "b"=>2, "c"=>3}

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

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

@param options オプションをハッシュで指定し...

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

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

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

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


require '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}...
...# {"a"=>1, "b"=>2, "c"=>3}

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

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

@param options オプションをハッシュで指定し...