るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.023秒)
トップページ > クラス:Complex[x] > クエリ:complex[x] > クエリ:arg[x] > バージョン:2.2.0[x] > クエリ:to_json[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. _builtin arg
  2. etc sc_arg_max
  3. mkmf arg_config
  4. complex arg
  5. rake arg_names

ライブラリ

検索結果

Complex#to_json(*args) -> String (81718.0)

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

...ら JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 使用しません。

//emlist[例][ruby]{
require 'json/add/complex'
Complex
(2, 3).to_json # => "{\"json_class\":\"Complex\",\"r\":2,\"i\":3}"
//}

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