D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Regexp
/
Filename :
as_json-i.ri
back
Copy
U:RDoc::AnyMethod[iI"as_json:ETI"Regexp#as_json;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"JMethods <tt>Regexp#as_json</tt> and +Regexp.json_create+ may be used ;TI"4to serialize and deserialize a \Regexp object; ;TI"#see Marshal[rdoc-ref:Marshal].;To:RDoc::Markup::BlankLine o; ; [I"8\Method <tt>Regexp#as_json</tt> serializes +self+, ;TI"4returning a 2-element hash representing +self+:;T@o:RDoc::Markup::Verbatim; [I"require 'json/add/regexp' ;TI"x = /foo/.as_json ;TI"7# => {"json_class"=>"Regexp", "o"=>0, "s"=>"foo"} ;T:@format0o; ; [I"P\Method +JSON.create+ deserializes such a hash, returning a \Regexp object:;T@o;; [I"%Regexp.json_create(x) # => /foo/;T; 0: @fileI"$ext/json/lib/json/add/regexp.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*);T@ FI"Regexp;TcRDoc::NormalClass00