るりまサーチ

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

別のキーワード

  1. json to_json
  2. json state
  3. json parser
  4. json parse
  5. json []

ライブラリ

キーワード

検索結果

<< < 1 2 >>

JSON::State#indent -> String (3139.0)

インデントに使用する文字列を返します。

...インデントに使用する文字列を返します。

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

json
_state = JSON::State.new(indent: "\t")
json
_state.indent # => "\t"
JSON
.generate({key1: "value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"
//}...

JSON::State#generate(obj) -> String (3135.0)

Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.

...Generates a valid JSON document from object obj and returns the
result. If no valid JSON document can be created this method raises a
GeneratorError exception....
<< < 1 2 >>