7件ヒット
[1-7件を表示]
(0.024秒)
種類
- インスタンスメソッド (6)
- 特異メソッド (1)
ライブラリ
- json (7)
キーワード
- new (1)
- space= (1)
-
space
_ before (1) -
space
_ before= (1) -
to
_ h (1) -
to
_ hash (1)
検索結果
先頭5件
-
JSON
:: State # space -> String (63523.0) -
JSON 形式の文字列のトークン間に挿入する文字列を返します。
...//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(space: "")
json_state.space # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state = JSON::State.new(space: "\t")
json_state.space # => "... -
JSON
:: State # space _ before -> String (27523.0) -
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列を返します。
...list[例][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 = JSON::State.new(space_before: " ")
json_state.space_befo... -
JSON
:: State # space=(string) (27505.0) -
JSON 形式の文字列のトークン間に挿入する文字列をセットします。
...string JSON 形式の文字列のトークン間に挿入する文字列を指定します。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(space: "")
json_state.space # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tana... -
JSON
:: State # space _ before=(string) (27505.0) -
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,... -
JSON
:: State . new(options = {}) -> JSON :: State (9541.0) -
自身を初期化します。
...by]{
require "json"
json_state = JSON::State.new(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}
//emlist[例 JSON::State を指定][ruby]{
require "json"
json_state = JSON::State.new(indent: "\t")
copy = JSON::State.new(json_state)
copy.class # =... -
JSON
:: State # to _ h -> Hash (9094.0) -
自身をハッシュに変換します。
...自身をハッシュに変換します。
//emlist[例][ruby]{
require "json"
require "pp"
json_state = JSON::State.new
pp json_state.to_h
# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,... -
JSON
:: State # to _ hash -> Hash (9094.0) -
自身をハッシュに変換します。
...自身をハッシュに変換します。
//emlist[例][ruby]{
require "json"
require "pp"
json_state = JSON::State.new
pp json_state.to_h
# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,...