るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.127秒)
トップページ > クエリ:t[x] > クエリ:String[x] > 種類:インスタンスメソッド[x] > クエリ:class[x] > クエリ:to_json[x] > クラス:BigDecimal[x]

別のキーワード

  1. argf.class each
  2. argf.class each_line
  3. argf.class lines
  4. argf.class to_a
  5. argf.class gets

ライブラリ

検索結果

BigDecimal#to_json(*args) -> String (24334.0)

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

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

@param args 使用しません。

//emlist[例][ruby]{
require 'json/add/bigdecimal'
BigDecimal
('0.123456789123456789').to_json # => "{\"json_class\":\"BigDecimal\",\"b\":\"36:0.123456789123456789e0\"}"
//}

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

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

//emlist[例][ruby]{
require 'json/add/bigdecimal'
BigDecimal
('0.123456789123456789').to_json # => "{\"json_class\...
...":\"BigDecimal\",\"b\":\"36:0.123456789123456789e0\"}"
//}

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