るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.020秒)
トップページ > クラス:Regexp[x] > バージョン:2.2.0[x] > クエリ:Hash#to_json[x]

別のキーワード

  1. << rexml::attribute#name
  2. add rexml::attribute#name
  3. handle_interrupt thread#raise
  4. service drb::extserv#stop_service
  5. inspect? irb::context#inspect_mode

ライブラリ

検索結果

Regexp#to_json(*args) -> String (22.0)

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

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

@param args 引数には何の意味もありません。

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

/0\d{1,4}-\d{1,4}-\d{4}/.to_json # => "{\"json_class\":\"Regexp\",\"o\":0,\"s\":\"0\\\\d{1,4}-\\\\d{1,4}-\\\\d{4}\"}"
//}...