JSON

JSON is a lightweight data-interchange format. It
is easy for us humans to read and write. Plus, equally simple for machines
to generate or parse. JSON is completely language
agnostic, making it the ideal interchange format.

Built on two universally available structures:

1. A collection of name/value pairs. Often referred to as an _object_, hash table, record, struct, keyed list, or associative array.
2. An ordered list of values. More commonly called an _array_, vector, sequence or list.

Load a ruby data structure from a JSONsource and return it. A source can either be a string-like object,
an IO-like object, or an object responding to the read method. If
proc was given, it will be called with any nested Ruby object as
an argument recursively in depth first order. To modify the default options
pass in the optional options argument as well.

BEWARE: This method is meant to serialise data from trusted user input,
like from your own database server or clients under your control, it could
be dangerous to allow untrusted users to pass JSON
sources into it. The default options for the parser can be changed via the
::load_default_options
method.

This method is part of the implementation of the load/dump interface of
Marshal and YAML.

Parse the JSON document source into a Ruby
data structure and return it. The bang version of the parse method defaults
to the more dangerous values for the opts hash, so be sure only to
parse trusted source documents.

opts can have the following keys:

max_nesting: The maximum depth of nesting allowed in the
parsed data structures. Enable depth checking with :max_nesting =>
anInteger. The parse! methods defaults to not doing max depth checking:
This can be dangerous if someone wants to fill up your stack.

allow_nan: If set to true, allow NaN, Infinity,
and -Infinity in defiance of RFC 7159 to be parsed by the Parser. This
option defaults to true.

create_additions: If set to false, the Parser doesn't
create additions even if a matching class and ::create_id was found. This
option defaults to false.