json 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/ext/json/ext/generator/generator.c +2 -2
- data/ext/json/ext/parser/parser.c +7 -7
- data/ext/json/ext/parser/parser.rl +7 -7
- data/lib/json/pure/parser.rb +1 -1
- data/lib/json/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc2f560520b0ab901bb8e064664fc74f0c818947048be8519ec8828c14573009
|
4
|
+
data.tar.gz: 91463f0e0c677b0f431780da2362324a00d3f51baf7ea77485636dee2b400c6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eea451caa191ebe5a93de37238799d2b04ce0657f23a1098243c996a1d5047322c276241c0adb8ffe60cdd8436d46488edcd7aaebb8e2065c7406b387a4b553
|
7
|
+
data.tar.gz: d5cd65f836be70cc02c078589c20c98a85995d75f71a6d02be7bedb5a43d7bc02538859f7fe621eedbe2112a29dc8bc57f995a51c336cc36b85b53a38f82becb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.3
|
@@ -997,10 +997,10 @@ static void generate_json_float(FBuffer *buffer, VALUE Vstate, JSON_Generator_St
|
|
997
997
|
if (!allow_nan) {
|
998
998
|
if (isinf(value)) {
|
999
999
|
fbuffer_free(buffer);
|
1000
|
-
rb_raise(eGeneratorError, "%
|
1000
|
+
rb_raise(eGeneratorError, "%"PRIsVALUE" not allowed in JSON", RB_OBJ_STRING(tmp));
|
1001
1001
|
} else if (isnan(value)) {
|
1002
1002
|
fbuffer_free(buffer);
|
1003
|
-
rb_raise(eGeneratorError, "%
|
1003
|
+
rb_raise(eGeneratorError, "%"PRIsVALUE" not allowed in JSON", RB_OBJ_STRING(tmp));
|
1004
1004
|
}
|
1005
1005
|
}
|
1006
1006
|
fbuffer_append_str(buffer, tmp);
|
@@ -948,7 +948,7 @@ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|
948
948
|
|
949
949
|
{p = p - 1; } {p+= 1; cs = 29; goto _out;}
|
950
950
|
} else {
|
951
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
951
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
|
952
952
|
}
|
953
953
|
}
|
954
954
|
np = JSON_parse_float(json, p, pe, result);
|
@@ -990,7 +990,7 @@ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|
990
990
|
if (json->allow_nan) {
|
991
991
|
*result = CInfinity;
|
992
992
|
} else {
|
993
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
993
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p - 8);
|
994
994
|
}
|
995
995
|
}
|
996
996
|
|
@@ -1002,7 +1002,7 @@ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|
1002
1002
|
if (json->allow_nan) {
|
1003
1003
|
*result = CNaN;
|
1004
1004
|
} else {
|
1005
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
1005
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p - 2);
|
1006
1006
|
}
|
1007
1007
|
}
|
1008
1008
|
|
@@ -2348,7 +2348,7 @@ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|
2348
2348
|
if(cs >= JSON_array_first_final) {
|
2349
2349
|
return p + 1;
|
2350
2350
|
} else {
|
2351
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
2351
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
|
2352
2352
|
return NULL;
|
2353
2353
|
}
|
2354
2354
|
}
|
@@ -2413,7 +2413,7 @@ static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int
|
|
2413
2413
|
}
|
2414
2414
|
rb_enc_raise(
|
2415
2415
|
EXC_ENCODING eParserError,
|
2416
|
-
"
|
2416
|
+
"incomplete unicode character escape sequence at '%s'", p
|
2417
2417
|
);
|
2418
2418
|
} else {
|
2419
2419
|
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
@@ -2426,7 +2426,7 @@ static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int
|
|
2426
2426
|
}
|
2427
2427
|
rb_enc_raise(
|
2428
2428
|
EXC_ENCODING eParserError,
|
2429
|
-
"
|
2429
|
+
"incomplete surrogate pair at '%s'", p
|
2430
2430
|
);
|
2431
2431
|
}
|
2432
2432
|
if (pe[0] == '\\' && pe[1] == 'u') {
|
@@ -3225,7 +3225,7 @@ static VALUE cParser_parse(VALUE self)
|
|
3225
3225
|
if (cs >= JSON_first_final && p == pe) {
|
3226
3226
|
return result;
|
3227
3227
|
} else {
|
3228
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
3228
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
|
3229
3229
|
return Qnil;
|
3230
3230
|
}
|
3231
3231
|
}
|
@@ -222,14 +222,14 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu
|
|
222
222
|
if (json->allow_nan) {
|
223
223
|
*result = CNaN;
|
224
224
|
} else {
|
225
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
225
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p - 2);
|
226
226
|
}
|
227
227
|
}
|
228
228
|
action parse_infinity {
|
229
229
|
if (json->allow_nan) {
|
230
230
|
*result = CInfinity;
|
231
231
|
} else {
|
232
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
232
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p - 8);
|
233
233
|
}
|
234
234
|
}
|
235
235
|
action parse_string {
|
@@ -245,7 +245,7 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu
|
|
245
245
|
fexec p + 10;
|
246
246
|
fhold; fbreak;
|
247
247
|
} else {
|
248
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
248
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
|
249
249
|
}
|
250
250
|
}
|
251
251
|
np = JSON_parse_float(json, fpc, pe, result);
|
@@ -447,7 +447,7 @@ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|
447
447
|
if(cs >= JSON_array_first_final) {
|
448
448
|
return p + 1;
|
449
449
|
} else {
|
450
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
450
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
|
451
451
|
return NULL;
|
452
452
|
}
|
453
453
|
}
|
@@ -512,7 +512,7 @@ static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int
|
|
512
512
|
}
|
513
513
|
rb_enc_raise(
|
514
514
|
EXC_ENCODING eParserError,
|
515
|
-
"
|
515
|
+
"incomplete unicode character escape sequence at '%s'", p
|
516
516
|
);
|
517
517
|
} else {
|
518
518
|
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
@@ -525,7 +525,7 @@ static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int
|
|
525
525
|
}
|
526
526
|
rb_enc_raise(
|
527
527
|
EXC_ENCODING eParserError,
|
528
|
-
"
|
528
|
+
"incomplete surrogate pair at '%s'", p
|
529
529
|
);
|
530
530
|
}
|
531
531
|
if (pe[0] == '\\' && pe[1] == 'u') {
|
@@ -864,7 +864,7 @@ static VALUE cParser_parse(VALUE self)
|
|
864
864
|
if (cs >= JSON_first_final && p == pe) {
|
865
865
|
return result;
|
866
866
|
} else {
|
867
|
-
rb_enc_raise(EXC_ENCODING eParserError, "
|
867
|
+
rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
|
868
868
|
return Qnil;
|
869
869
|
}
|
870
870
|
}
|
data/lib/json/pure/parser.rb
CHANGED
@@ -179,7 +179,7 @@ module JSON
|
|
179
179
|
bytes << c[6 * i + 2, 2].to_i(16) << c[6 * i + 4, 2].to_i(16)
|
180
180
|
i += 1
|
181
181
|
end
|
182
|
-
JSON.iconv('utf-8', 'utf-16be', bytes)
|
182
|
+
JSON.iconv('utf-8', 'utf-16be', bytes).force_encoding(::Encoding::ASCII_8BIT)
|
183
183
|
end
|
184
184
|
end
|
185
185
|
if string.respond_to?(:force_encoding)
|
data/lib/json/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a JSON implementation as a Ruby extension in C.
|
14
14
|
email: flori@ping.de
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
90
|
+
rubygems_version: 3.4.0.dev
|
91
91
|
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: JSON Implementation for Ruby
|