るりまサーチ

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

別のキーワード

  1. json state
  2. random state
  3. _builtin state
  4. state []
  5. state []=

ライブラリ

検索結果

<< < 1 2 3 4 ... > >>

Encoding::Stateless_ISO_2022_JP_KDDI -> Encoding (6100.0)

stateless-ISO-2022-JP-KDDI エンコーディングです。

...stateless-ISO-2022-JP-KDDI エンコーディングです。

state
less-ISO-2022-JP の亜種です。
KDDI の携帯電話で使われる絵文字が含まれています。


@see https://www.au.com/ezfactory/tec/spec/img/typeD.pdf...

JSON::Ext::Generator::State (6016.0)

Alias of JSON::State

...Alias of JSON::State...

JSON::State (6000.0)

Ruby オブジェクトから JSON 形式の文字列を生成する間、 JSON 形式の文字列を生成するための設定を保持しておくために使用するクラスです。

Ruby オブジェクトから JSON 形式の文字列を生成する間、
JSON 形式の文字列を生成するための設定を保持しておくために使用するクラスです。

JSON::State.new(options = {}) -> JSON::State (3167.0)

自身を初期化します。

...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 # => JS...

JSON::State#configure(options = {}) -> self (3054.0)

与えられたハッシュで自身を設定します。

...ュのキーについては JSON::State.new を参照してください。

@param options このオブジェクトの設定をするためのハッシュを指定します。

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

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

json_state.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}

@see JSON::State.new...

絞り込み条件を変える

JSON::State#max_nesting -> Integer (3054.0)

生成される JSON 形式の文字列のネストの深さの最大値を返します。

...n"

json_state = JSON::State.new(max_nesting: 2)
json_state.max_nesting # => 2
JSON.generate([[]], json_state)
JSON.generate([[[]]], json_state) # => JSON::NestingError
//}

//emlist[例 ネストの深さチェックを行わない][ruby]{
require "json"

json_state = JSON::State.new(max...
..._nesting: 0)
json_state.max_nesting # => 0
JSON.generate([[[[[[[[[[]]]]]]]]]], json_state)
//}...

JSON::State#merge(options = {}) -> self (3054.0)

与えられたハッシュで自身を設定します。

...ュのキーについては JSON::State.new を参照してください。

@param options このオブジェクトの設定をするためのハッシュを指定します。

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

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

json_state.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}

@see JSON::State.new...

JSON::State#object_nl -> String (3048.0)

JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を返します。

...[ruby]{
require "json"

json_state = JSON::State.new(object_nl: "")
json_state.object_nl # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]

json_state = JSON::State.new(object_nl: "\n")
json_state.object_nl # =>...
..."\n"
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)

# => [1,2,{
# "name":"tanaka",
# "age":19
# }]
//}...

JSON::State#space -> String (3048.0)

JSON 形式の文字列のトークン間に挿入する文字列を返します。

...t[例][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 # => "\t"
puts...
...JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name": "tanaka","age": 19}]
//}...
<< < 1 2 3 4 ... > >>