るりまサーチ

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

別のキーワード

  1. time now
  2. date now
  3. fiddle rtld_now
  4. datetime now
  5. _builtin now

ライブラリ

検索結果

Time#to_json(*args) -> String (39144.0)

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

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

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

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

Time
.now.to_json # => "{\"json_class\":\"Time\",\"s\":1544968675,\"n\":676167...
...000}"
//}

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