json 2.5.1 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +16 -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: 28754306f4a5a73cb18a8a02a519b8efcfb84ff59c2cece37ba9c37dd157c29c
|
4
|
+
data.tar.gz: 3bdeda4996bde6e7f28e55cfd47dd278d5f65ed709ac5ec444da46a0fa878621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b760312c30f7a69b57abc61f19ca2ca06a7d592d2dd5f51fe8d06c42763a74f91ef5474c339c4c8f8e6a1e29de1886e5e3e63ecc474ed205a9a1a49c4c1014c
|
7
|
+
data.tar.gz: 54a87c4287805b5af55c34578623d79b33f7a1c04ed739e3265423153a1e95952bc888adc5c0613c6e6ba48df96aa995eff9e74cc715491200db61707d3aa356
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
### 2021-10-24 (2.6.1)
|
4
|
+
|
5
|
+
* Restore version.rb with 2.6.1
|
6
|
+
|
7
|
+
### 2021-10-14 (2.6.0)
|
8
|
+
|
9
|
+
* Use `rb_enc_interned_str` if available to reduce allocations in `freeze: true` mode. #451.
|
10
|
+
* Bump required_ruby_version to 2.3.
|
11
|
+
* Fix compatibility with `GC.compact`.
|
12
|
+
* Fix some compilation warnings. #469
|
13
|
+
|
3
14
|
## 2020-12-22 (2.5.1)
|
4
15
|
|
5
16
|
* Restore the compatibility for constants of JSON class.
|
@@ -83,7 +94,7 @@
|
|
83
94
|
|
84
95
|
## 2015-09-11 (2.0.0)
|
85
96
|
* Now complies to newest JSON RFC 7159.
|
86
|
-
* Implements
|
97
|
+
* Implements compatibility to ruby 2.4 integer unification.
|
87
98
|
* Drops support for old rubies whose life has ended, that is rubies < 2.0.
|
88
99
|
Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
|
89
100
|
* There were still some mentions of dual GPL licensing in the source, but JSON
|
@@ -124,9 +135,9 @@
|
|
124
135
|
## 2013-02-04 (1.7.7)
|
125
136
|
* Security fix for JSON create_additions default value and
|
126
137
|
`JSON::GenericObject`. It should not be possible to create additions unless
|
127
|
-
|
138
|
+
explicitly requested by setting the create_additions argument to true or
|
128
139
|
using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
|
129
|
-
be automatically deserialised, this has to be
|
140
|
+
be automatically deserialised, this has to be explicitly enabled by
|
130
141
|
setting
|
131
142
|
JSON::GenericObject.json_creatable = true
|
132
143
|
as well.
|
@@ -272,7 +283,7 @@
|
|
272
283
|
## 2010-04-23 (1.4.0)
|
273
284
|
* Major speed improvements and building with simplified
|
274
285
|
directory/file-structure.
|
275
|
-
* Extension should at least be
|
286
|
+
* Extension should at least be compatible with MRI, YARV and Rubinius.
|
276
287
|
|
277
288
|
## 2010-04-07 (1.2.4)
|
278
289
|
* Triger const_missing callback to make Rails' dynamic class loading work.
|
@@ -290,7 +301,7 @@
|
|
290
301
|
strings in object names/keys.
|
291
302
|
|
292
303
|
## 2009-10-01 (1.2.0)
|
293
|
-
* `fast_generate` now raises an
|
304
|
+
* `fast_generate` now raises an exception for nan and infinite floats.
|
294
305
|
* On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
|
295
306
|
and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
|
296
307
|
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.1
|
@@ -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
|
}
|