るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.065秒)
トップページ > バージョン:2.5.0[x] > クエリ:p[x] > クエリ:add[x] > クエリ:json/add/exception[x]

別のキーワード

  1. tracer add_filter
  2. rexml/document add
  3. logger add
  4. openssl add_extension
  5. socket ip_add_membership

ライブラリ

クラス

検索結果

json/add/exception (150001.0)

Exception に JSON 形式の文字列に変換するメソッドや JSON 形式の文字列から Ruby のオブジェクトに変換するメソッドを定義します。

Exception に JSON 形式の文字列に変換するメソッドや JSON 形式の文字列から Ruby のオブジェクトに変換するメソッドを定義します。

Exception#to_json(*args) -> String (33019.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\":\"ZeroDivis...