method
parse
v1_9_2_180 -
Show latest stable
-
0 notes -
Class: JSON
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (38)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
parse(source, opts = {})
public
Parse the JSON document source into a Ruby data structure and return it.
opts can have the following keys:
-
max_nesting: The maximum depth of nesting allowed in the parsed data
structures. Disable depth checking with :max_nesting => false, it defaults to 19.
-
allow_nan: If set to true, allow NaN, Infinity and -Infinity in
defiance of RFC 4627 to be parsed by the Parser. This option defaults to false.
-
symbolize_names: If set to true, returns symbols for the names
(keys) in a JSON object. Otherwise strings are returned, which is also the default.
-
create_additions: If set to false, the Parser doesn’t create
additions even if a matchin class and create_id was found. This option defaults to true.