mirror of
https://github.com/ruby/ruby.git
synced 2025-09-24 04:54:01 +02:00
parent
be6447381c
commit
7d8ce96de6
1 changed files with 1 additions and 17 deletions
|
@ -243,12 +243,6 @@ module JSON
|
||||||
# Use class \Set:
|
# Use class \Set:
|
||||||
# ruby = JSON.parse(source, {array_class: Set})
|
# ruby = JSON.parse(source, {array_class: Set})
|
||||||
# ruby # => #<Set: {"foo", 1.0, true, false, nil}>
|
# ruby # => #<Set: {"foo", 1.0, true, false, nil}>
|
||||||
# Try class \Object:
|
|
||||||
# # Raises NoMethodError (undefined method `<<' for #<Object:>):
|
|
||||||
# JSON.parse(source, {array_class: Object})
|
|
||||||
# Bad value:
|
|
||||||
# # Raises TypeError (wrong argument type Symbol (expected Class)):
|
|
||||||
# JSON.parse(source, {array_class: :foo})
|
|
||||||
#
|
#
|
||||||
# ---
|
# ---
|
||||||
#
|
#
|
||||||
|
@ -257,16 +251,6 @@ module JSON
|
||||||
#
|
#
|
||||||
# ====== Exceptions
|
# ====== Exceptions
|
||||||
#
|
#
|
||||||
# Raises an exception if +source+ is not \String-convertible:
|
|
||||||
#
|
|
||||||
# # Raises TypeError (no implicit conversion of Symbol into String):
|
|
||||||
# JSON.parse(:foo)
|
|
||||||
#
|
|
||||||
# Raises an exception if +opts+ is not \Hash-convertible:
|
|
||||||
#
|
|
||||||
# # Raises TypeError (no implicit conversion of Symbol into Hash):
|
|
||||||
# JSON.parse(['foo'], :foo)
|
|
||||||
#
|
|
||||||
# Raises an exception if +source+ is not valid JSON:
|
# Raises an exception if +source+ is not valid JSON:
|
||||||
#
|
#
|
||||||
# # Raises JSON::ParserError (783: unexpected token at ''):
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
||||||
|
@ -277,7 +261,7 @@ module JSON
|
||||||
end
|
end
|
||||||
|
|
||||||
# Calls
|
# Calls
|
||||||
# JSON.parse(source, opts)
|
# parse(source, opts)
|
||||||
# with +source+ and possibly modified +opts+.
|
# with +source+ and possibly modified +opts+.
|
||||||
#
|
#
|
||||||
# Differences from JSON.parse:
|
# Differences from JSON.parse:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue