@@ -141,6 +141,9 @@ class MissingUnicodeSupport < JSONError; end
141
141
142
142
module_function
143
143
144
+ # :call-seq:
145
+ # JSON.parse(source, opts) -> object
146
+ #
144
147
# Argument +source+ contains the \String to be parsed. It must be a
145
148
# {String-convertible object}[doc/implicit_conversion_rdoc.html#label-String-Convertible+Objects]
146
149
# (implementing +to_str+), and must contain valid \JSON data.
@@ -260,6 +263,9 @@ def parse(source, opts = {})
260
263
Parser . new ( source , **( opts ||{ } ) ) . parse
261
264
end
262
265
266
+ # :call-seq:
267
+ # JSON.parse!(source, opts) -> object
268
+ #
263
269
# Calls
264
270
# parse(source, opts)
265
271
# with +source+ and possibly modified +opts+.
@@ -276,6 +282,9 @@ def parse!(source, opts = {})
276
282
Parser . new ( source , **( opts ||{ } ) ) . parse
277
283
end
278
284
285
+ # :call-seq:
286
+ # JSON.generate(obj, opts = nil) -> new_string
287
+ #
279
288
# Argument +obj+ is the Ruby object to be converted to \JSON.
280
289
#
281
290
# Argument +opts+, if given, contains options for the generation, and must be a
@@ -463,6 +472,9 @@ def fast_generate(obj, opts = nil)
463
472
module_function :fast_unparse
464
473
# :startdoc:
465
474
475
+ # :call-seq:
476
+ # JSON.pretty_generate(obj, opts = nil) -> new_string
477
+ #
466
478
# Arguments +obj+ and +opts+ here are the same as
467
479
# arguments +obj+ and +opts+ in JSON.generate.
468
480
#
0 commit comments