Repository URL to install this package:
Version:
2.6.3 ▾
|
json
/
CHANGES.md
|
---|
rb_enc_interned_str
if available to reduce allocations in freeze: true
mode. #451.GC.compact
.create_additions
to always be false
for JSON(user_input)
and JSON.parse(user_input, nil)
.
Note that JSON.load
remains with default true
and is meant for internal
serialization of trusted data. [CVE-2020-10663]decimal_class
option to specify a class as which to parse
JSON float numbers.required_ruby_version
to 1.9required_ruby_version
for json_pure.RB_GC_GUARD
to avoid possible GC problem via Pete Johns.current_nesting
on stack by Aaron Patterson.JSON.dump_default_options
.space_before
accessor in generator.JSON::GenericObject
to make
serialize :some_attribute, JSON::GenericObject
work in Rails active models for convenient SomeModel#some_attribute.foo.bar
access to serialised JSON data.JSON::GenericObject
. It should not be possible to create additions unless
explicitly requested by setting the create_additions argument to true or
using the JSON.load/dump interface. If JSON::GenericObject
is supposed to
be automatically deserialised, this has to be explicitly enabled by
setting
JSON::GenericObject.json_creatable = true
as well.GeneratorState#merge
alias for JRuby, fix state accessor methods. Thx to
jvshahid@github.JSON::GenericObject
for method access to objects transmitted via JSON.object_class
/array_class
with duck typed hash/array.JSON.load('')
return nil as well to make mysql text columns (default to
''
) work better for serialization.quirks_mode
.as_json
methods in json/add/core, so rails can create its json objects
the new way.object_class
and array_class
when inheriting from Hash or
Array.deep_const_get
to aid debugging.Module#const_defined?
method, that was
reported by Riley Goodside.to_json
method definіtions that only have one
argument.State#[]
method which returns an attribute's value in order to
increase duck type compatibility to Hash.:symbolize_names
option to Parser, which returns symbols instead of
strings in object names/keys.fast_generate
now raises an exception for nan and infinite floats.extra_rdoc_files
.JSON.parse!
method without depth checking for people who
like danger.pretty_generate
methods configurable by an options hash.max_nesting
feature for generate methods, too.\
as required by RFC4627. There's a
contradiction between David Crockford's JSON checker test vectors (in
tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because
the JSON checker seems to be a bit older than the RFC."{ ... }"
or array "[ ... ]"
in
order to be parsed without raising an exception. The definition of what
constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and
there are differences in floats and integers (no octals or hexadecimals) as
well.pretty_generate
of unparse and pretty_unparse
.Iconv::InvalidEncoding
exception, that seems to occur on some Sun
boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was
reported by Andrew R Jackson andrewj@bcm.tmc.edu, thanks a bunch!