ÿØÿà JFIF ÿÛ „ ( %!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
ÿØÿà JFIF ÿÛ „
(
%!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ
ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ
ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ
? ¼QxJQaÍuò¸Zö
Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
????????????????????????????????????
????????????????????????????????????
ÿØÿà JFIF ÿÛ „ ( %!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
ÿØÿà JFIF ÿÛ „
(
%!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ
ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ
ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ
? ¼QxJQaÍuò¸Zö
Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
????????????????????????????????????
????????????????????????????????????
U:RDoc::AnyMethod[iI" load:ETI"JSON#load;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"DReturns the Ruby objects created by parsing the given +source+.;To:RDoc::Markup::BlankLine o;
; [ I"MBEWARE: This method is meant to serialise data from trusted user input, ;TI"Plike from your own database server or clients under your control, it could ;TI"Ibe dangerous to allow untrusted users to pass JSON sources into it. ;TI"GIf you must use it, use JSON.unsafe_load instead to make it clear.;T@o;
; [ I"ISince JSON version 2.8.0, `load` emits a deprecation warning when a ;TI"Rnon native type is deserialized, without `create_additions` being explicitly ;TI"Tenabled, and in JSON version 3.0, `load` will have `create_additions` disabled ;TI"by default.;T@o:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o;
; [I"@Argument +source+ must be, or be convertible to, a \String:;To;;
;;[
o;;0; [o;
; [I"7If +source+ responds to instance method +to_str+, ;TI"/source.to_str becomes the source.;To;;0; [o;
; [I"6If +source+ responds to instance method +to_io+, ;TI"3source.to_io.read becomes the source.;To;;0; [o;
; [I"5If +source+ responds to instance method +read+, ;TI"-source.read becomes the source.;To;;0; [o;
; [I"SIf both of the following are true, source becomes the \String 'null':;To;;
;;[o;;0; [o;
; [I"3Option +allow_blank+ specifies a truthy value.;To;;0; [o;
; [I"MThe source, as defined above, is +nil+ or the empty \String ''.;To;;0; [o;
; [I",Otherwise, +source+ remains the source.;To;;0; [o;
; [I"KArgument +proc+, if given, must be a \Proc that accepts one argument. ;TI"IIt will be called recursively with each result (depth-first order). ;TI"See details below.;To;;0; [o;
; [I"MArgument +opts+, if given, contains a \Hash of options for the parsing. ;TI"@See {Parsing Options}[#module-JSON-label-Parsing+Options]. ;TI"NThe default options can be changed via method JSON.load_default_options=.;T@S:RDoc::Markup::Rule:weighti@o;
; [I"SWhen no +proc+ is given, modifies +source+ as above and returns the result of ;TI"/parse(source, opts); see #parse.;T@o;
; [I"#Source for following examples:;To:RDoc::Markup::Verbatim; [I"source = <<~JSON
;TI" {
;TI" "name": "Dave",
;TI" "age" :40,
;TI" "hats": [
;TI" "Cattleman's",
;TI" "Panama",
;TI" "Tophat"
;TI" ]
;TI" }
;TI"
JSON
;T:@format0o;
; [I"Load a \String:;To;; [I"ruby = JSON.load(source)
;TI"Xruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
;T;0o;
; [I"Load an \IO object:;To;; [I"require 'stringio'
;TI".object = JSON.load(StringIO.new(source))
;TI"Zobject # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
;T;0o;
; [I"Load a \File object:;To;; [
I"path = 't.json'
;TI"File.write(path, source)
;TI"File.open(path) do |file|
;TI" JSON.load(file)
;TI"Wend # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
;T;0S;;i@o;
; [I"When +proc+ is given:;To;;
;;[ o;;0; [o;
; [I" Modifies +source+ as above.;To;;0; [o;
; [I"AGets the +result+ from calling parse(source, opts).;To;;0; [o;
; [I"-Recursively calls proc(result).;To;;0; [o;
; [I"Returns the final result.;T@o;
; [I"
Example:;To;; [-I"require 'json'
;TI"
;TI"%# Some classes for the example.
;TI"class Base
;TI"" def initialize(attributes)
;TI"" @attributes = attributes
;TI" end
;TI" end
;TI"class User < Base; end
;TI"class Account < Base; end
;TI"class Admin < Base; end
;TI"# The JSON source.
;TI"json = <<-EOF
;TI"{
;TI" "users": [
;TI"N {"type": "User", "username": "jane", "email": "jane@example.com"},
;TI"M {"type": "User", "username": "john", "email": "john@example.com"}
;TI"
],
;TI" "accounts": [
;TI"Q {"account": {"type": "Account", "paid": true, "account_id": "1234"}},
;TI"Q {"account": {"type": "Account", "paid": false, "account_id": "1235"}}
;TI"
],
;TI"8 "admins": {"type": "Admin", "password": "0wn3d"}
;TI"}
;TI" EOF
;TI"# Deserializer method.
;TI"Cdef deserialize_obj(obj, safe_types = %w(User Account Admin))
;TI"- type = obj.is_a?(Hash) && obj["type"]
;TI"I safe_types.include?(type) ? Object.const_get(type).new(obj) : obj
;TI" end
;TI"# Call to JSON.load
;TI"(ruby = JSON.load(json, proc {|obj|
;TI" case obj
;TI" when Hash
;TI"7 obj.each {|k, v| obj[k] = deserialize_obj v }
;TI" when Array
;TI"+ obj.map! {|v| deserialize_obj v }
;TI" end
;TI"})
;TI"
pp ruby
;T;0o;
; [I"Output:;To;; [I"{"users"=>
;TI"# [#"User", "username"=>"jane", "email"=>"jane@example.com"}>,
;TI"$ #"User", "username"=>"john", "email"=>"john@example.com"}>],
;TI" "accounts"=>
;TI" [{"account"=>
;TI") #"Account", "paid"=>true, "account_id"=>"1234"}>},
;TI" {"account"=>
;TI") #"Account", "paid"=>false, "account_id"=>"1235"}>}],
;TI" "admins"=>
;TI"# #"Admin", "password"=>"0wn3d"}>};T;0:
@fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I";JSON.load(source, proc = nil, options = {}) -> object
;T0[[I"restore;To;; [ ;@;0I"((source, proc = nil, options = nil);T@FI" JSON;TcRDoc::NormalModule00