48件ヒット
[1-48件を表示]
(0.035秒)
種類
- モジュール関数 (24)
- インスタンスメソッド (24)
ライブラリ
- json (48)
クラス
-
JSON
:: State (24)
モジュール
- JSON (24)
キーワード
- generate (12)
-
space
_ before= (12) - unparse (12)
検索結果
先頭4件
-
JSON
:: State # space _ before -> String (18226.0) -
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列を返します。
...json_state = JSON::State.new(space_before: "")
json_state.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 JSO... -
JSON
:: State # space _ before=(string) (6232.0) -
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列をセットします。
...。
@param string JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の
前に挿入する文字列をセットします。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(space_before: "")
json_state.space_before......# => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state.space_before = " "
json_state.space_before # => " "
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name" :"tanaka","age" :19}]
/... -
JSON
. # generate(object , state = nil) -> String (132.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...文字列です。
: :space
a string that is put after, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a J... -
JSON
. # unparse(object , state = nil) -> String (132.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...文字列です。
: :space
a string that is put after, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a J...