るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.071秒)

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file ctime
  4. file atime
  5. file mtime

ライブラリ

モジュール

検索結果

JSON.#dump(object, io = nil, limit = nil) -> String | IO (18150.0)

与えられたオブジェクトを JSON 形式の文字列に変換してダンプします。

...

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

JSON.dump({ name: "tanaka", age: 19 }) # => "{\"name\":\"tanaka\",\"age\":19}"
//}

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

File
.open("test.txt", "w") do |f|
JSON.dump([[[[[[[[[[]]]]]]]]]], f, 10) # => #<File:test.txt>
JSON.dump([[[[[[[[[[[]]]]]]]]]]], f,...
...10) # => exceed depth limit (ArgumentError)
end
//}

@see Marshal, Marshal.#dump...