120件ヒット
[101-120件を表示]
(0.091秒)
クラス
- Array (12)
-
JSON
:: State (108)
キーワード
- indent (12)
- indent= (12)
-
object
_ nl (12) -
object
_ nl= (12) - space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) -
to
_ csv (12)
検索結果
-
JSON
:: State # space _ before -> String (114.0) -
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列を返します。
...te.space_before # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state = JSON::State.new(space_before: " ")
json_state.space_before # => " "
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_sta... -
JSON
:: State # indent -> String (108.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\"}"
//}...