るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. json parser
  2. json state
  3. json parse
  4. json []

ライブラリ

検索結果

Regexp#to_json(*args) -> String (72784.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}\"}"
//}...