json 2.5.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -5
- data/README.md +3 -3
- data/VERSION +1 -1
- data/ext/json/ext/generator/generator.c +1 -11
- data/ext/json/ext/parser/extconf.rb +1 -0
- data/ext/json/ext/parser/parser.c +2972 -1813
- data/ext/json/ext/parser/parser.h +5 -1
- data/ext/json/ext/parser/parser.rl +66 -28
- data/json.gemspec +2 -8
- data/lib/json/pure/parser.rb +1 -1
- data/lib/json/version.rb +1 -1
- data/lib/json.rb +1 -1
- metadata +6 -87
- data/Gemfile +0 -14
- data/lib/json/ext/.keep +0 -0
- data/tests/fixtures/fail10.json +0 -1
- data/tests/fixtures/fail11.json +0 -1
- data/tests/fixtures/fail12.json +0 -1
- data/tests/fixtures/fail13.json +0 -1
- data/tests/fixtures/fail14.json +0 -1
- data/tests/fixtures/fail18.json +0 -1
- data/tests/fixtures/fail19.json +0 -1
- data/tests/fixtures/fail2.json +0 -1
- data/tests/fixtures/fail20.json +0 -1
- data/tests/fixtures/fail21.json +0 -1
- data/tests/fixtures/fail22.json +0 -1
- data/tests/fixtures/fail23.json +0 -1
- data/tests/fixtures/fail24.json +0 -1
- data/tests/fixtures/fail25.json +0 -1
- data/tests/fixtures/fail27.json +0 -2
- data/tests/fixtures/fail28.json +0 -2
- data/tests/fixtures/fail29.json +0 -1
- data/tests/fixtures/fail3.json +0 -1
- data/tests/fixtures/fail30.json +0 -1
- data/tests/fixtures/fail31.json +0 -1
- data/tests/fixtures/fail32.json +0 -1
- data/tests/fixtures/fail4.json +0 -1
- data/tests/fixtures/fail5.json +0 -1
- data/tests/fixtures/fail6.json +0 -1
- data/tests/fixtures/fail7.json +0 -1
- data/tests/fixtures/fail8.json +0 -1
- data/tests/fixtures/fail9.json +0 -1
- data/tests/fixtures/obsolete_fail1.json +0 -1
- data/tests/fixtures/pass1.json +0 -56
- data/tests/fixtures/pass15.json +0 -1
- data/tests/fixtures/pass16.json +0 -1
- data/tests/fixtures/pass17.json +0 -1
- data/tests/fixtures/pass2.json +0 -1
- data/tests/fixtures/pass26.json +0 -1
- data/tests/fixtures/pass3.json +0 -6
- data/tests/json_addition_test.rb +0 -199
- data/tests/json_common_interface_test.rb +0 -169
- data/tests/json_encoding_test.rb +0 -107
- data/tests/json_ext_parser_test.rb +0 -15
- data/tests/json_fixtures_test.rb +0 -40
- data/tests/json_generator_test.rb +0 -399
- data/tests/json_generic_object_test.rb +0 -82
- data/tests/json_parser_test.rb +0 -497
- data/tests/json_string_matching_test.rb +0 -38
- data/tests/lib/core_assertions.rb +0 -763
- data/tests/lib/envutil.rb +0 -365
- data/tests/lib/find_executable.rb +0 -22
- data/tests/lib/helper.rb +0 -4
- data/tests/ractor_test.rb +0 -30
- data/tests/test_helper.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcc1346522e82980a0a5891f93738a33d0d367b0013e22440a85282b6d56721e
|
4
|
+
data.tar.gz: a7d4a06c398e9a550664e29096f85eaab0f7007bac945e69d3b869b24df2017b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91235d83102ee7de2a1263a6b4d351fa61a3fa9440a31dc00cd391995721e333e609ab569f93ec9b2ad9e6b68a721d96a18af8e515d77d11c81d7626b82ab0f3
|
7
|
+
data.tar.gz: f2dcfe70be72b2df3567ee35bc3f4ecbf170ed6022362bc31cab151609ec3e3a0ef7aa339e81c0816987b25c7132fa222e1a51bc19af8cf4bf8143d66d5ed157
|
data/CHANGES.md
CHANGED
@@ -83,7 +83,7 @@
|
|
83
83
|
|
84
84
|
## 2015-09-11 (2.0.0)
|
85
85
|
* Now complies to newest JSON RFC 7159.
|
86
|
-
* Implements
|
86
|
+
* Implements compatibility to ruby 2.4 integer unification.
|
87
87
|
* Drops support for old rubies whose life has ended, that is rubies < 2.0.
|
88
88
|
Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
|
89
89
|
* There were still some mentions of dual GPL licensing in the source, but JSON
|
@@ -124,9 +124,9 @@
|
|
124
124
|
## 2013-02-04 (1.7.7)
|
125
125
|
* Security fix for JSON create_additions default value and
|
126
126
|
`JSON::GenericObject`. It should not be possible to create additions unless
|
127
|
-
|
127
|
+
explicitly requested by setting the create_additions argument to true or
|
128
128
|
using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
|
129
|
-
be automatically deserialised, this has to be
|
129
|
+
be automatically deserialised, this has to be explicitly enabled by
|
130
130
|
setting
|
131
131
|
JSON::GenericObject.json_creatable = true
|
132
132
|
as well.
|
@@ -272,7 +272,7 @@
|
|
272
272
|
## 2010-04-23 (1.4.0)
|
273
273
|
* Major speed improvements and building with simplified
|
274
274
|
directory/file-structure.
|
275
|
-
* Extension should at least be
|
275
|
+
* Extension should at least be compatible with MRI, YARV and Rubinius.
|
276
276
|
|
277
277
|
## 2010-04-07 (1.2.4)
|
278
278
|
* Triger const_missing callback to make Rails' dynamic class loading work.
|
@@ -290,7 +290,7 @@
|
|
290
290
|
strings in object names/keys.
|
291
291
|
|
292
292
|
## 2009-10-01 (1.2.0)
|
293
|
-
* `fast_generate` now raises an
|
293
|
+
* `fast_generate` now raises an exception for nan and infinite floats.
|
294
294
|
* On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
|
295
295
|
and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
|
296
296
|
functions are used to convert from all supported encodings. ASCII-8BIT
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# JSON implementation for Ruby
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![CI](https://github.com/flori/json/actions/workflows/ci.yml/badge.svg)](https://github.com/flori/json/actions/workflows/ci.yml)
|
4
4
|
|
5
5
|
## Description
|
6
6
|
|
@@ -267,7 +267,7 @@ the `pp` library's `pp` methods.
|
|
267
267
|
|
268
268
|
The script `tools/server.rb` contains a small example if you want to test, how
|
269
269
|
receiving a JSON object from a webrick server in your browser with the
|
270
|
-
|
270
|
+
JavaScript prototype library http://www.prototypejs.org works.
|
271
271
|
|
272
272
|
## Speed Comparisons
|
273
273
|
|
@@ -294,7 +294,7 @@ extension:
|
|
294
294
|
```
|
295
295
|
|
296
296
|
In the table above 1 is `JSON::Ext::Parser`, 2 is `YAML.load` with YAML
|
297
|
-
|
297
|
+
compatible JSON document, 3 is is `JSON::Pure::Parser`, and 4 is
|
298
298
|
`ActiveSupport::JSON.decode`. The ActiveSupport JSON-decoder converts the
|
299
299
|
input first to YAML and then uses the YAML-parser, the conversion seems to
|
300
300
|
slow it down so much that it is only as fast as the `JSON::Pure::Parser`!
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.0
|
@@ -1,11 +1,6 @@
|
|
1
1
|
#include "../fbuffer/fbuffer.h"
|
2
2
|
#include "generator.h"
|
3
3
|
|
4
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
5
|
-
static VALUE CEncoding_UTF_8;
|
6
|
-
static ID i_encoding, i_encode;
|
7
|
-
#endif
|
8
|
-
|
9
4
|
static VALUE mJSON, mExt, mGenerator, cState, mGeneratorMethods, mObject,
|
10
5
|
mHash, mArray,
|
11
6
|
#ifdef RUBY_INTEGER_UNIFICATION
|
@@ -948,7 +943,7 @@ static void generate_json_string(FBuffer *buffer, VALUE Vstate, JSON_Generator_S
|
|
948
943
|
fbuffer_append_char(buffer, '"');
|
949
944
|
#ifdef HAVE_RUBY_ENCODING_H
|
950
945
|
if (!enc_utf8_compatible_p(rb_enc_get(obj))) {
|
951
|
-
obj =
|
946
|
+
obj = rb_str_export_to_enc(obj, rb_utf8_encoding());
|
952
947
|
}
|
953
948
|
#endif
|
954
949
|
if (state->ascii_only) {
|
@@ -1610,9 +1605,4 @@ void Init_generator(void)
|
|
1610
1605
|
i_match = rb_intern("match");
|
1611
1606
|
i_keys = rb_intern("keys");
|
1612
1607
|
i_dup = rb_intern("dup");
|
1613
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
1614
|
-
CEncoding_UTF_8 = rb_funcall(rb_path2class("Encoding"), rb_intern("find"), 1, rb_str_new2("utf-8"));
|
1615
|
-
i_encoding = rb_intern("encoding");
|
1616
|
-
i_encode = rb_intern("encode");
|
1617
|
-
#endif
|
1618
1608
|
}
|