るりまサーチ

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

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. zlib end

ライブラリ

モジュール

検索結果

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

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

...ist[例][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...