HEX
Server: Apache
System: Linux sxb1plzcpnl440011.prod.sxb1.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: xfp2mtarcm67 (7705020)
PHP: 7.3.33
Disabled: NONE
Upload Files
File: //opt/alt/ruby32/share/gems/doc/json-2.16.0/ri/JSON/generate-i.ri
U:RDoc::AnyMethod[iI"
generate:ETI"JSON#generate;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I";Returns a \String containing the generated \JSON data.;To:RDoc::Markup::BlankLineo;
;	[I"#See also JSON.pretty_generate.;T@o;
;	[I"@Argument +obj+ is the Ruby object to be converted to \JSON.;T@o;
;	[I"PArgument +opts+, if given, contains a \Hash of options for the generation. ;TI"ESee {Generating Options}[#module-JSON-label-Generating+Options].;T@S:RDoc::Markup::Rule:weighti@o;
;	[I"IWhen +obj+ is an \Array, returns a \String containing a \JSON array:;To:RDoc::Markup::Verbatim;	[I"*obj = ["foo", 1.0, true, false, nil]
;TI"json = JSON.generate(obj)
;TI"-json # => '["foo",1.0,true,false,null]'
;T:@format0o;
;	[I"HWhen +obj+ is a \Hash, returns a \String containing a \JSON object:;To;;	[I")obj = {foo: 0, bar: 's', baz: :bat}
;TI"json = JSON.generate(obj)
;TI"1json # => '{"foo":0,"bar":"s","baz":"bat"}'
;T;0o;
;	[I"=For examples of generating from other Ruby objects, see ;TI"b{Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects].;T@S;;
i@o;
;	[I"CRaises an exception if any formatting option is not a \String.;T@o;
;	[I"?Raises an exception if +obj+ contains circular references:;To;;	[I"*a = []; b = []; a.push(b); b.push(a)
;TI"?# Raises JSON::NestingError (nesting of 100 is too deep):
;TI"JSON.generate(a);T;0:
@fileI"lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"2JSON.generate(obj, opts = nil) -> new_string
;T0[I"(obj, opts = nil);T@:FI"	JSON;TcRDoc::NormalModule00