979件ヒット
[1-100件を表示]
(0.053秒)
クラス
- BigDecimal (22)
- Complex (22)
- Date (11)
- DateTime (22)
- Exception (22)
-
JSON
:: Parser (22) -
JSON
:: State (264) - OpenStruct (11)
- Range (11)
- Rational (22)
- Regexp (11)
- Struct (11)
- Symbol (11)
- Time (22)
モジュール
- JSON (198)
-
JSON
:: Generator :: GeneratorMethods :: Array (11) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (11) -
JSON
:: Generator :: GeneratorMethods :: Float (11) -
JSON
:: Generator :: GeneratorMethods :: Hash (11) -
JSON
:: Generator :: GeneratorMethods :: Integer (11) -
JSON
:: Generator :: GeneratorMethods :: NilClass (11) -
JSON
:: Generator :: GeneratorMethods :: Object (11) -
JSON
:: Generator :: GeneratorMethods :: String (33) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (11) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (11) - Kernel (33)
キーワード
- CircularDatastructure (11)
- Editor (11)
- Extend (22)
- Infinity (11)
- Integer (22)
- JSON (11)
- MinusInfinity (11)
- MissingUnicodeSupport (11)
- NestingError (11)
- NilClass (22)
- String (22)
-
VARIANT
_ BINARY (11) - VERSION (11)
- [] (11)
-
array
_ nl (11) -
ascii
_ only? (11) -
buffer
_ initial _ length (11) -
buffer
_ initial _ length= (11) -
check
_ circular? (11) - configure (11)
-
create
_ id (11) -
create
_ id= (11) - depth (11)
- dump (11)
-
fast
_ generate (11) -
fast
_ unparse (11) -
from
_ state (11) - generate (22)
- indent (11)
- indent= (11)
- j (11)
- jj (11)
-
json
_ create (77) - load (11)
-
max
_ nesting (11) -
max
_ nesting= (11) - merge (11)
- new (22)
-
object
_ nl (11) -
object
_ nl= (11) - parse (11)
- parse! (11)
-
pretty
_ generate (11) -
pretty
_ unparse (11) -
quirks
_ mode (11) -
quirks
_ mode= (11) -
quirks
_ mode? (11) - restore (11)
- source (11)
- space (11)
- space= (11)
-
space
_ before (11) -
space
_ before= (11) -
to
_ json (231) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11) - unparse (11)
検索結果
先頭5件
-
JSON
:: MinusInfinity -> Float (18302.0) -
負の無限大を表します。
負の無限大を表します。
@see Float -
JSON
:: Infinity -> Float (12202.0) -
正の無限大を表します。
正の無限大を表します。
@see Float -
JSON
. create _ id=(identifier) (6202.0) -
json_create メソッドで使用するクラスを決定するために使用する値をセットします。
...
json_create メソッドで使用するクラスを決定するために使用する値をセットします。
@param identifier 識別子を指定します。
//emlist[例][ruby]{
require "json"
require "json/add/core"
JSON.create_id # => "json_class"
puts (1..5).to_json......# => {"json_class":"Range","a":[1,5,false]}
JSON.create_id = "my_json_class" # => "my_json_class"
JSON.create_id # => "my_json_class"
puts (1..5).to_json # => {"my_json_class":"Range","a":[1,5,false]}
//}... -
JSON
:: State # buffer _ initial _ length -> Integer (6202.0) -
This integer returns the current initial length of the buffer.
...This integer returns the current initial length of the buffer.... -
JSON
:: State # indent -> String (6202.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 # indent=(string) (6202.0) -
インデントに使用する文字列をセットします。
...ring インデントに使用する文字列を指定します。
//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.i......ndent = " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}... -
JSON
:: State # max _ nesting -> Integer (6202.0) -
生成される JSON 形式の文字列のネストの深さの最大値を返します。
... JSON 形式の文字列のネストの深さの最大値を返します。
この値がゼロである場合は、ネストの深さのチェックを行いません。
//emlist[例 ネストの深さチェックを行う][ruby]{
require "json"
json_state = JSON::State.new(max_nesting: 2)
json_s......_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.gene......rate([[[[[[[[[[]]]]]]]]]], json_state)
//}... -
JSON
. create _ id -> String (6102.0) -
json_create メソッドで使用するクラスを決定するために使用する値を返します。
...
json_create メソッドで使用するクラスを決定するために使用する値を返します。
デフォルトは "json_class" です。
//emlist[例][ruby]{
require "json"
class User
attr :id, :name
def initialize(id, name)
@id, @name = id, name
end
def self.json_create(......new(object['id'], object["name"])
end
def as_json(*)
{
JSON.create_id => self.class.name,
"id" => id,
"name" => name,
}
end
def to_json(*)
as_json.to_json
end
end
json = JSON.generate(User.new(1, "tanaka"))
json # => "{\"json_class\":\"User\",\"id\":1,\"nam......e\":\"tanaka\"}"
JSON.parse(json, create_additions: true)
# => #<User:0x0000557709b269e0 @id=1, @name="tanaka">
//}... -
JSON
:: State # ascii _ only? -> bool (6102.0) -
ASCII 文字列のみを用いて JSON 形式の文字列を生成する場合に真を返します。 そうでない場合に偽を返します。
...ASCII 文字列のみを用いて JSON 形式の文字列を生成する場合に真を返します。
そうでない場合に偽を返します。... -
JSON
:: State # buffer _ initial _ length=(length) (6102.0) -
This sets the initial length of the buffer to length, if length > 0, otherwise its value isn't changed.
...This sets the initial length of the buffer to length, if length > 0,
otherwise its value isn't changed....