ライブラリ
- json (33)
-
json
/ add / bigdecimal (11)
クラス
- BigDecimal (11)
モジュール
- JSON (33)
キーワード
-
JSON
_ LOADED (11) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) -
json
/ add / core (11) -
json
_ create (11) - restore (11)
検索結果
先頭5件
-
JSON
. # load(source , proc = nil , options = {}) -> object (35237.0) -
与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
... JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
proc として手続きオブジェクトが与えられた場合は、読み込んだオブジェクトを
引数にその手続きを呼び出します。
require 'json'
str=<<JSON
[1,2,3]
JSON......
JSON.load(str) # => [1,2,3]
JSON.load(str, proc{|v| p v }) # => [1,2,3]
# 以下が表示される
# 1
# 2
# 3
# [1,2,3]
str=<<JSON
{ "a":1, "b":2, "c":3 }
JSON
JSON.load(str) # => {"a"=>1, "b"=>2, "c"=>3}
JSON.load(str, proc{|v| p v }) # => {"a"=>1, "b"=>2, "c"=>3}......# 以下が表示される
# "a"
# 1
# "b"
# 2
# "c"
# 3
# {"a"=>1, "b"=>2, "c"=>3}
@param source JSON 形式の文字列を指定します。他には、to_str, to_io, read メソッドを持つオブジェクトも指定可能です。
@param proc Proc オブジェクトを指... -
JSON
:: JSON _ LOADED -> bool (29217.0) -
JSON ライブラリがロード済みである場合に真を返します。 そうでない場合は偽を返します。
...
JSON ライブラリがロード済みである場合に真を返します。
そうでない場合は偽を返します。... -
JSON
. # restore(source , proc = nil , options = {}) -> object (20137.0) -
与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
... JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
proc として手続きオブジェクトが与えられた場合は、読み込んだオブジェクトを
引数にその手続きを呼び出します。
require 'json'
str=<<JSON
[1,2,3]
JSON......
JSON.load(str) # => [1,2,3]
JSON.load(str, proc{|v| p v }) # => [1,2,3]
# 以下が表示される
# 1
# 2
# 3
# [1,2,3]
str=<<JSON
{ "a":1, "b":2, "c":3 }
JSON
JSON.load(str) # => {"a"=>1, "b"=>2, "c"=>3}
JSON.load(str, proc{|v| p v }) # => {"a"=>1, "b"=>2, "c"=>3}......# 以下が表示される
# "a"
# 1
# "b"
# 2
# "c"
# 3
# {"a"=>1, "b"=>2, "c"=>3}
@param source JSON 形式の文字列を指定します。他には、to_str, to_io, read メソッドを持つオブジェクトも指定可能です。
@param proc Proc オブジェクトを指... -
BigDecimal
. json _ create(hash) -> BigDecimal (6123.0) -
JSON のオブジェクトから BigDecimal のオブジェクトを生成して返します。
...
JSON のオブジェクトから BigDecimal のオブジェクトを生成して返します。
@param hash Marshal.#load 可能な値をキー 'b' に持つハッシュを指定します。... -
json
/ add / core (6080.0) -
Ruby のコアクラスに JSON 形式の文字列に変換するメソッドや JSON 形式の文字列から Ruby のオブジェクトに変換するメソッドを定義します。
...コアクラスに JSON 形式の文字列に変換するメソッドや
JSON 形式の文字列から Ruby のオブジェクトに変換するメソッドを定義します。
json/add/core サブライブラリを require すると、例えば Range オブ
ジェクトを JSON 形式の文字列......にしたり、Range オブジェクトに戻す事
ができます。
//emlist[例][ruby]{
require 'json/add/core'
(1..10).to_json # => "{\"json_class\":\"Range\",\"a\":[1,10,false]}"
JSON.load((1..10).to_json) # => 1..10
//}... -
NEWS for Ruby 3
. 1 . 0 (72.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* Kernel#load が第2引数にモジュールを渡せるようになり、渡されたモジュールをトップレベルのモジュールとしてファイルを読み込むようになりました。 6210
* Marshal
* 変更されたメソッド
* Marshal.load が freeze: tru......* TracePoint のコールバック中に再入を許す TracePoint.allow_reentry が追加されました。 15912
* $LOAD_PATH
* 変更されたメソッド
* $LOAD_PATH.resolve_feature_path が失敗時に例外を発生させなくなりました。 16043
* Fiber Scheduler
*......1.0.1
* fiddle 1.1.0
* fileutils 1.6.0
* find 0.1.1
* io-console 0.5.10
* io-wait 0.2.1
* ipaddr 1.2.3
* irb 1.4.1
* json 2.6.1
* logger 1.5.0
* net-http 0.2.0
* net-protocol 0.1.2
* nkf 0.1.1
* open-uri 0.2.0
* openssl 3.0.0
* optparse 0.2... -
NEWS for Ruby 2
. 7 . 0 (54.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ingPatternError
//}
//emlist{
json = <<END
{
"name": "Alice",
"age": 30,
"children": [{ "name": "Bob", "age": 2 }]
}
END
JSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: name, age: age}]}
p name #=> "Bob"
p age #=> 2
JSON.parse(json, symbolize_names: true) in {......で全ての引数を転送する時に使えます。 16154
* 変更されたメソッド
* Module#const_defined?のようにModule#autoload?が
inheritオプショナル引数を受け付けるようになりました。 15777
* Module#nameが常にfreezeされた文字列......ge#include?から変更されていました。)
15449
* RubyVM
* 削除されたメソッド
* RubyVM.resolve_feature_pathが$LOAD_PATH.resolve_feature_pathに移動しました。
15903 15230
* String
* Unicode
* Unicodeのバージョンと絵文字のバ... -
NEWS for Ruby 2
. 5 . 0 (18.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...vert fallback option to a keyword argument
https://github.com/ruby/psych/pull/342
* Add :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse
https://github.com/ruby/psych/pull/333, https://github.com/ruby/psych/pull/337
* Add Psych::Handler#event_locatio....../ruby/psych/pull/312
* rbconfig
* RbConfig::LIMITS is added to provide the limits of C types.
This is available when rbconfig/sizeof is loaded.
* ripper
* Ripper::EXPR_BEG and so on for Ripper#state.
* Ripper#state を追加。スキャナーの状態を伝えるためです... -
NEWS for Ruby 3
. 0 . 0 (18.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...pdate to Etc 1.2.0
* This version is Ractor compatible.
* Fiddle
* Update to Fiddle 1.0.5
* IRB
* Update to IRB 1.2.6
* JSON
* Update to JSON 2.5.0
* This version is Ractor compatible.
* Set
* Update to set 1.0.0
* SortedSet has been removed for dependency and per......pes of classes and modules with advanced types including union types, overloading, generics, and _interface types_ for duck typing.
* Ruby ships with type definitions for core/stdlib classes.
* `rbs` gem is bundled to load and process RBS files.
=== TypeProf
* TypeProf is a type analysis too... -
NEWS for Ruby 2
. 0 . 0 (12.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...非互換: Object#inspect は #to_s を呼び出さなくなりました。再定義された #to_s を呼び出すためです。
* LoadError
* 追加: LoadError#path ロードできなかったファイルのパスを返します
* Module
* 追加: Module#prepend 指定したモジ......のタグメーカーを呼び出すと CGI#header を header 要素を生成するために上書きします。
* csv
* CSV.dump と CSV.load を削除しました。ユーザーを危険なシリアライゼーションに関する脆弱性から保護するためです。
* iconv
*......:min, :time を受け付けます。
* io/wait
* 追加: IO#wait_writable
* 追加: IO#wait_readable は IO#wait の別名です。
* json
* 1.7.7 に更新
* net/http
* 新機能
* Proxies are now automatically detected from the http_proxy environment
variabl...