8693件ヒット
[1-100件を表示]
(0.109秒)
別のキーワード
ライブラリ
- ビルトイン (4105)
- benchmark (48)
- bigdecimal (36)
-
cgi
/ session (12) - csv (135)
- date (108)
- dbm (24)
- delegate (120)
- digest (12)
- drb (96)
-
drb
/ extserv (12) -
drb
/ gw (12) -
drb
/ timeridconv (24) - erb (12)
- fiber (8)
- fiddle (24)
- gdbm (60)
-
io
/ console (36) -
io
/ nonblock (12) -
irb
/ cmd / chws (24) -
irb
/ cmd / pushws (36) -
irb
/ cmd / subirb (48) -
irb
/ context (72) -
irb
/ extend-command (12) -
irb
/ output-method (72) - json (552)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / ostruct (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / symbol (12) -
json
/ add / time (12) - kconv (48)
- matrix (180)
-
minitest
/ spec (16) -
minitest
/ unit (7) - mkmf (48)
- monitor (36)
-
mutex
_ m (24) -
net
/ http (24) -
net
/ imap (60) -
net
/ pop (48) -
net
/ smtp (28) - observer (12)
- openssl (192)
- optparse (24)
- ostruct (46)
- pathname (24)
- pp (84)
- prettyprint (48)
- prime (48)
- pstore (60)
- psych (108)
- rake (48)
-
rdoc
/ code _ object (216) -
rdoc
/ generator / json _ index (12) -
rdoc
/ markup (12) -
rexml
/ document (156) -
rexml
/ parsers / pullparser (24) -
rinda
/ rinda (12) -
rinda
/ tuplespace (12) -
ripper
/ filter (36) - rss (36)
-
rubygems
/ config _ file (24) -
rubygems
/ package / tar _ header (12) -
rubygems
/ spec _ fetcher (24) -
rubygems
/ timer (12) - sdbm (36)
- set (36)
- shell (54)
-
shell
/ builtin-command (6) -
shell
/ command-processor (24) -
shell
/ filter (30) -
shell
/ process-controller (72) - shellwords (12)
- socket (72)
- stringio (96)
- strscan (24)
- sync (12)
- thread (18)
- thwait (12)
- timeout (16)
- tracer (12)
- weakref (24)
-
webrick
/ cgi (12) -
webrick
/ httpauth / authenticator (12) -
webrick
/ httpauth / basicauth (12) -
webrick
/ httpversion (24) -
webrick
/ log (12) -
webrick
/ server (12) - win32ole (192)
-
yaml
/ dbm (156) - zlib (36)
クラス
-
ARGF
. class (12) - Addrinfo (60)
- Array (542)
- BasicObject (168)
-
Benchmark
:: Job (48) - BigDecimal (48)
- Binding (56)
-
CGI
:: Session (12) - CSV (48)
-
CSV
:: FieldInfo (36) -
CSV
:: Row (39) -
CSV
:: Table (12) - Class (36)
- Complex (48)
- DBM (24)
-
DRb
:: DRbIdConv (24) -
DRb
:: DRbObject (48) -
DRb
:: DRbServer (12) -
DRb
:: DRbUnknown (12) -
DRb
:: ExtServ (12) -
DRb
:: GW (12) -
DRb
:: TimerIdConv (24) - Data (3)
- Date (108)
- DateTime (24)
- Delegator (84)
- ERB (12)
- Enumerator (96)
-
Enumerator
:: Chain (14) -
Enumerator
:: Lazy (35) -
Enumerator
:: Yielder (24) - Exception (12)
- Fiber (42)
-
Fiddle
:: Closure :: BlockCaller (12) -
Fiddle
:: Pointer (12) -
File
:: Stat (24) - FrozenError (6)
- GDBM (60)
-
Gem
:: ConfigFile (24) -
Gem
:: Package :: TarHeader (12) -
Gem
:: SpecFetcher (24) - Hash (253)
- IO (84)
-
IRB
:: Context (72) -
IRB
:: ExtendCommand :: ChangeWorkspace (12) -
IRB
:: ExtendCommand :: CurrentWorkingWorkspace (12) -
IRB
:: ExtendCommand :: Foreground (12) -
IRB
:: ExtendCommand :: IrbCommand (12) -
IRB
:: ExtendCommand :: Jobs (12) -
IRB
:: ExtendCommand :: Kill (12) -
IRB
:: ExtendCommand :: PopWorkspace (12) -
IRB
:: ExtendCommand :: PushWorkspace (12) -
IRB
:: ExtendCommand :: Workspaces (12) -
IRB
:: OutputMethod (60) -
IRB
:: StdioOutputMethod (12) - Integer (18)
-
JSON
:: Parser (24) -
JSON
:: State (348) - KeyError (16)
- LocalJumpError (24)
- Matrix (144)
- Method (68)
- Module (180)
- Monitor (12)
- Mutex (2)
- NameError (10)
-
Net
:: HTTP (12) -
Net
:: HTTPGenericRequest (12) -
Net
:: IMAP (12) -
Net
:: IMAP :: Envelope (12) -
Net
:: IMAP :: FetchData (12) -
Net
:: IMAP :: ResponseCode (12) -
Net
:: IMAP :: UntaggedResponse (12) -
Net
:: POP3 (12) -
Net
:: POPMail (36) -
Net
:: SMTP (28) - NoMethodError (12)
- Numeric (24)
- Object (961)
-
ObjectSpace
:: WeakMap (24) -
OpenSSL
:: ASN1 :: ASN1Data (12) -
OpenSSL
:: ASN1 :: ObjectId (60) -
OpenSSL
:: X509 :: Certificate (24) -
OpenSSL
:: X509 :: ExtensionFactory (60) -
OpenSSL
:: X509 :: Request (24) - OpenStruct (58)
- OptionParser (12)
- PP (24)
- PStore (48)
-
PStore
:: DummyMutex (12) - Pathname (24)
- PrettyPrint (48)
- Prime (12)
-
Prime
:: PseudoPrimeGenerator (36) - Proc (12)
-
Psych
:: Nodes :: Node (24) -
Psych
:: ScalarScanner (12) -
Psych
:: Visitors :: YAMLTree (24) -
RDoc
:: CodeObject (216) -
RDoc
:: Generator :: JsonIndex (12) -
RDoc
:: Markup (12) -
RDoc
:: Options (12) -
REXML
:: Attribute (12) -
REXML
:: DocType (12) -
REXML
:: Element (12) -
REXML
:: Elements (24) -
REXML
:: Parent (96) -
REXML
:: Parsers :: PullEvent (24) -
Rake
:: TaskArguments (24) - Random (48)
- Range (262)
- Rational (12)
- Regexp (24)
-
Rinda
:: DRbObjectTemplate (12) -
Rinda
:: TupleEntry (12) -
Ripper
:: Filter (36) -
RubyVM
:: InstructionSequence (12) - SDBM (36)
- Set (48)
- Shell (54)
-
Shell
:: CommandProcessor (24) -
Shell
:: Concat (6) -
Shell
:: Filter (30) -
Shell
:: ProcessController (72) - SimpleDelegator (24)
- StopIteration (12)
- String (153)
- StringIO (96)
- StringScanner (24)
- Struct (95)
- Symbol (12)
- Thread (68)
-
Thread
:: Mutex (10) -
Thread
:: Queue (36) -
Thread
:: SizedQueue (72) - ThreadsWait (12)
- Time (48)
- TracePoint (55)
- Tracer (12)
- UNIXSocket (12)
- UnboundMethod (36)
- UncaughtThrowError (22)
- Vector (36)
-
WEBrick
:: BasicLog (12) -
WEBrick
:: CGI (12) -
WEBrick
:: GenericServer (12) -
WEBrick
:: HTTPAuth :: BasicAuth (12) -
WEBrick
:: HTTPVersion (24) - WIN32OLE (84)
-
WIN32OLE
_ EVENT (24) -
WIN32OLE
_ PARAM (12) -
WIN32OLE
_ TYPE (12) -
WIN32OLE
_ TYPELIB (12) -
WIN32OLE
_ VARIABLE (12) -
WIN32OLE
_ VARIANT (36) - WeakRef (24)
-
YAML
:: DBM (156) -
Zlib
:: Deflate (12) -
Zlib
:: GzipWriter (24)
モジュール
- Comparable (15)
- DublinCoreModel (36)
- Enumerable (637)
-
IRB
:: ExtendCommandBundle (12) -
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (36) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (160)
-
MiniTest
:: Assertions (7) - MonitorMixin (24)
-
Mutex
_ m (24) - Observable (12)
-
OpenSSL
:: Buffering (12) -
OptionParser
:: Arguable (12) -
Rake
:: Cloneable (24) -
Sync
_ m (12) -
WEBrick
:: HTTPAuth :: Authenticator (12)
キーワード
- ! (12)
- != (24)
- !~ (12)
- << (96)
- <=> (12)
- == (48)
- === (56)
- =~ (9)
- DelegateClass (12)
- Digest (12)
- JSON (12)
- [] (294)
- []= (48)
-
_ _ drbref (12) -
_ _ drburi (12) -
_ _ getobj _ _ (36) -
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ _ setobj _ _ (36) -
_ dump (12) -
_ getproperty (12) -
_ invoke (12) -
active
_ job? (6) -
active
_ jobs (6) -
active
_ jobs _ exist? (6) - add (12)
- adjugate (12)
- ajd (12)
- all (12)
- allocate (12)
-
allow
_ nan? (12) - amjd (12)
- append (8)
-
arg
_ config (12) - args (12)
-
array
_ nl (12) -
array
_ nl= (12) -
ascii
_ only? (12) -
assert
_ empty (1) -
assert
_ includes (1) -
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
assert
_ nil (1) -
assert
_ respond _ to (1) - at (12)
- attr (12)
- begin (12)
- bind (24)
-
bind
_ call (12) -
body
_ stream (12) - bsearch (36)
-
buffer
_ initial _ length (12) -
buffer
_ initial _ length= (12) - bytes (12)
- call (36)
-
check
_ circular? (12) -
chunk
_ while (12) - clamp (27)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - clone (24)
-
cofactor
_ expansion (12) - collect (36)
-
collect
_ concat (24) - column (24)
- comment (12)
- comment= (12)
- component (24)
- concat (18)
- configure (12)
- conj (36)
- conjugate (36)
- connect (12)
-
connect
_ from (12) -
connect
_ to (12) -
const
_ get (12) -
const
_ set (12) - context (24)
- convert (48)
- cooked (12)
- count (24)
- cover? (12)
-
create
_ extension (12) - cycle (24)
- data (24)
-
dc
_ subject (12) -
dc
_ subject= (12) -
dc
_ subjects (12) - deconstruct (12)
-
def
_ class (12) - default (36)
-
define
_ singleton _ method (24) - delete (132)
-
delete
_ at (12) -
delete
_ field (12) -
delete
_ if (12) -
delete
_ observer (12) - depth (12)
- depth= (12)
- deq (24)
- detect (12)
-
dev
_ major (12) - devmajor (12)
- dig (40)
- disable (12)
- disjoint? (12)
- display (12)
- divide (24)
-
document
_ children (12) -
document
_ children= (12) -
document
_ self (12) -
document
_ self= (12) - documented? (12)
- dup (24)
- each (73)
-
each
_ child (12) -
each
_ entry (12) -
each
_ with _ object (24) - element (24)
- enable (12)
- encode (36)
- end (12)
- enq (12)
- entries (19)
-
enum
_ for (24) - eql? (24)
- equal? (24)
- eval (24)
- evaluate (12)
- execute (108)
- exit (12)
-
exit
_ value (12) - extend (12)
-
extend
_ object (12) - extended (12)
- feed (12)
- fetch (140)
-
fetch
_ spec (12) -
fetch
_ values (20) - field (12)
- filter (21)
-
filter
_ map (6) - find (12)
-
find
_ all (12) -
find
_ index (12) -
finish
_ all _ jobs (18) - first (48)
-
flat
_ map (24) - flush (12)
- force (12)
- freeze (12)
- front (24)
- frozen? (12)
- generate (24)
- getlocal (24)
- grep (24)
-
grep
_ v (24) - group (12)
-
group
_ by (12) - handler (12)
- handler= (12)
- hash (12)
- header (12)
- include? (12)
- indent (12)
- indent= (12)
- index (19)
- initialize (12)
-
initialize
_ clone (12) -
initialize
_ copy (12) -
initialize
_ dup (12) - inject (48)
- inspect (12)
-
inspect
_ mode (12) -
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) - invert (12)
- invoke (12)
- irb (9)
-
irb
_ exit (12) -
is
_ a? (12) - isjis (12)
- issjis (12)
- item (12)
- itself (12)
- jd (12)
- jisx0301 (24)
- jj (12)
- jobs (12)
-
jobs
_ exist? (6) - join (72)
-
join
_ nowait (6) -
json
_ creatable? (12) - julian (12)
- julian? (12)
- key (20)
- keys (12)
- kill (6)
-
kill
_ job (6) -
kind
_ of? (12) -
laplace
_ expansion (12) - last (36)
-
last
_ value (12) - line (12)
- list (12)
- listen (12)
- ljust (12)
- ln (12)
-
load
_ file (12) -
load
_ specs (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) - logger (24)
-
long
_ name (12) - lookup (12)
- mail (12)
- main (12)
- major (12)
- major= (12)
-
major
_ version (24) - map (24)
-
marshal
_ dump (24) -
marshal
_ load (24) - match (24)
- max (88)
-
max
_ by (12) -
max
_ nesting (12) -
max
_ nesting= (12) - member? (12)
- merge (12)
- method (12)
-
method
_ missing (36) - methods (12)
- min (88)
-
min
_ by (12) - minmax (48)
-
minmax
_ by (12) - mjd (12)
-
module
_ eval (24) -
module
_ exec (12) -
mon
_ synchronize (18) -
mu
_ pp (1) -
mu
_ synchronize (12) -
must
_ be (1) -
must
_ be _ close _ to (1) -
must
_ be _ empty (1) -
must
_ be _ instance _ of (1) -
must
_ be _ kind _ of (1) -
must
_ be _ nil (1) -
must
_ be _ same _ as (1) -
must
_ be _ within _ delta (1) -
must
_ be _ within _ epsilon (1) -
must
_ equal (1) -
must
_ include (1) -
must
_ match (1) -
must
_ raise (1) -
must
_ respond _ to (1) -
must
_ send (1) -
must
_ throw (1) - new (12)
- next (12)
- nil? (12)
- noecho (12)
- nonblock (12)
- none? (19)
-
object
_ group (12) -
object
_ id (12) -
object
_ nl (12) -
object
_ nl= (12) - oid (12)
-
ole
_ obj _ help (12) -
ole
_ type (12) -
on
_ XXX (12) -
on
_ default (12) - one? (19)
- open (12)
- output (12)
- pack (21)
- parameters (43)
- params (12)
- parent (12)
- parent= (12)
-
parent
_ file _ name (12) -
parent
_ name (12) - parse (24)
- partition (12)
- peek (12)
- pop (48)
- pp (24)
- ppx (12)
- prepend (8)
-
pretty
_ inspect (12) -
pretty
_ print (12) -
pretty
_ print _ cycle (12) -
pretty
_ print _ inspect (12) -
pretty
_ print _ instance _ variables (12) - print (36)
- printf (12)
- printn (12)
-
private
_ methods (12) -
protected
_ methods (12) -
psych
_ to _ yaml (12) -
psych
_ y (12) -
public
_ method (12) -
public
_ methods (12) -
public
_ send (24) - push (48)
- pushd (6)
- pushdir (6)
- putc (48)
- puts (48)
-
quirks
_ mode (12) -
quirks
_ mode= (12) -
quirks
_ mode? (12) - raise (18)
- rand (36)
- rassoc (12)
- raw (12)
-
rcptto
_ list (12) -
rdev
_ major (12) - reason (12)
- receiver (47)
-
recv
_ io (12) - reduce (36)
- reject (144)
- reject! (96)
- reload (12)
-
remove
_ class _ variable (12) -
remove
_ classes _ and _ modules (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
remove
_ methods _ etc (12) - report (12)
-
respond
_ to? (12) -
respond
_ to _ missing? (12) - responses (12)
- result (12)
- resume (12)
-
return
_ value (12) - rewind (7)
- rjust (12)
- sample (24)
-
save
_ exception _ mode (12) -
save
_ limit (12) -
save
_ rounding _ mode (12) -
scan
_ full (12) -
search
_ full (12) - section (12)
- section= (12)
- select (60)
- self (12)
- send (24)
-
set
_ last _ value (12) - shelljoin (12)
- shift (60)
-
short
_ name (12) -
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - slice (12)
- slice! (12)
-
slice
_ when (23) - sn (12)
- sort (24)
-
sort
_ by (12) - source (12)
- space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - start (40)
-
start
_ doc (12) -
start
_ job (6) -
stop
_ doc (12) - store (24)
- strftime (24)
- subject (36)
- subject= (24)
-
subject
_ certificate (12) -
subject
_ certificate= (12) -
subject
_ request (12) -
subject
_ request= (12) - sum (42)
-
sync
_ synchronize (6) - synchronize (60)
- syswrite (12)
- t (12)
- tag (11)
- taint (9)
- tainted? (9)
- tap (12)
-
terminate
_ job (6) - text (24)
- then (14)
-
thread
_ variable _ get (12) - time (12)
- timeout (16)
-
to
_ a (55) -
to
_ ary (12) -
to
_ c (12) -
to
_ enum (24) -
to
_ h (24) -
to
_ hash (24) -
to
_ id (24) -
to
_ int (12) -
to
_ io (12) -
to
_ json (252) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
to
_ obj (24) -
to
_ proc (12) -
to
_ regexp (12) -
to
_ ruby (12) -
to
_ s (12) -
to
_ str (12) -
to
_ value (12) -
to
_ yaml (12) - tojis (12)
- tokenize (12)
- tosjis (12)
-
trace
_ func (12) - transact (18)
- transaction (12)
- transfer (12)
- transform (12)
- transpose (12)
- trust (9)
- umask (6)
-
unconverted
_ fields? (12) - unpack (12)
- unpack1 (9)
- unshift (24)
- untaint (9)
- untrust (9)
- untrusted? (9)
- value (59)
- values (36)
-
values
_ at (36) -
wait
_ all _ jobs _ execution (6) -
waiting
_ job? (6) -
waiting
_ jobs (6) -
waiting
_ jobs _ exist? (6) - width (12)
-
with
_ index (12) -
with
_ object (48) -
with
_ werror (24) - write (24)
-
write
_ nonblock (12) - xpopen (12)
- y (12)
- yield (12)
-
yield
_ self (16) - zip (24)
- | (6)
検索結果
先頭5件
- Kernel
# j(*objects) -> nil - JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String - JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String - JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String - JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String
-
Kernel
# j(*objects) -> nil (18108.0) -
与えられたオブジェクトを JSON 形式の文字列で標準出力に一行で出力します。
...与えられたオブジェクトを JSON 形式の文字列で標準出力に一行で出力します。
@param objects JSON 形式で出力したいオブジェクトを指定します。
//emlist[例][ruby]{
require "json"
j([1,2,{"name" => "tanaka","age" => 19}])
# => [1,2,{"name":"tanaka","... -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身から生成した JSON 形式の文字列を返します。
...自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
[1, 2, 3].to_json # => "[1,2,3]"
//}... -
JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身から生成した JSON 形式の文字列を返します。
...ら生成した JSON 形式の文字列を返します。
"false" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new......の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
false.to_json # => "false"
//}... -
JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身から生成した JSON 形式の文字列を返します。
...自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
(1.0).to_json # => "1.0"
//}... -
JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身から生成した JSON 形式の文字列を返します。
...自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
person = { "name" => "tanaka", "age" => 19 }
person.to_json # => "{\"name\":\"tanaka\",\"age\":19}"
//}... -
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身から生成した JSON 形式の文字列を返します。
...自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//}... -
JSON
:: Generator :: GeneratorMethods :: NilClass # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身から生成した JSON 形式の文字列を返します。
...ら生成した JSON 形式の文字列を返します。
"null" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の......引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
nil.to_json # => "null"
//}... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...にした結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生成する JSON 形式の文......列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name,......age)
@name, @age = name, age
end
end
tanaka = Person.new("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Object
//}... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身から生成した JSON 形式の文字列を返します。
...から生成した JSON 形式の文字列を返します。
自身のエンコードは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。
@param state_or_hash 生成する JSON 形式の文...... JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
puts "test".to_json # => "test"
puts '"'.to_json # => "\""
puts "\\".to_jso......n # => "\\"
puts "𤘩宮城".to_json(ascii_only: true) # => "\ud851\ude29\u5bae\u57ce"
//}...