るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. _builtin exception
  2. exception exception
  3. bigdecimal exception_all
  4. bigdecimal exception_nan
  5. thread abort_on_exception

クラス

キーワード

検索結果

Exception.json_create(hash) -> Exception (63307.0)

JSON のオブジェクトから Ruby のオブジェクトを生成して返します。

...
JSON
のオブジェクトから Ruby のオブジェクトを生成して返します。

@param hash 適切なキーを持つハッシュを指定します。...

Exception#to_json(*args) -> String (63004.0)

自身を JSON 形式の文字列に変換して返します。

...自身を JSON 形式の文字列に変換して返します。

内部的にはハッシュにデータをセットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡...
...れます。

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

begin
0/0
rescue => e
e.to_json # => "{\"json_class\":\"ZeroDivisionError\",\"m\":\"divided by 0\",\"b\":[\"/path/to/test.rb:4:in `/'\",\"/path/to/test.rb:4:in `<main>'\"]}"
end
//}

@see JSON::Generator::GeneratorMethods::Hash#to_json...

JSON::State#generate(obj) -> String (55.0)

Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.

...Generates a valid JSON document from object obj and returns the
result. If no valid JSON document can be created this method raises a
GeneratorError exception....