るりまサーチ

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

別のキーワード

  1. state depth
  2. state depth=
  3. json depth
  4. json depth=
  5. http verify_depth

ライブラリ

モジュール

検索結果

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

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

..."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 (Argu...
...mentError)
end
//}

@see Marshal, Marshal.#dump...