oj 3.7.4 → 3.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/ext/oj/buf.h +6 -34
- data/ext/oj/cache8.c +3 -3
- data/ext/oj/cache8.h +5 -33
- data/ext/oj/circarray.c +5 -9
- data/ext/oj/circarray.h +5 -8
- data/ext/oj/code.c +3 -6
- data/ext/oj/code.h +7 -10
- data/ext/oj/compat.c +11 -14
- data/ext/oj/custom.c +108 -75
- data/ext/oj/dump.c +132 -92
- data/ext/oj/dump.h +6 -7
- data/ext/oj/dump_compat.c +37 -34
- data/ext/oj/dump_leaf.c +3 -6
- data/ext/oj/dump_object.c +23 -17
- data/ext/oj/dump_strict.c +7 -9
- data/ext/oj/encode.h +6 -32
- data/ext/oj/err.c +2 -5
- data/ext/oj/err.h +6 -34
- data/ext/oj/extconf.rb +6 -0
- data/ext/oj/fast.c +39 -56
- data/ext/oj/hash.c +11 -39
- data/ext/oj/hash.h +5 -33
- data/ext/oj/hash_test.c +3 -31
- data/ext/oj/mimic_json.c +65 -44
- data/ext/oj/object.c +38 -69
- data/ext/oj/odd.c +18 -17
- data/ext/oj/odd.h +6 -9
- data/ext/oj/oj.c +139 -93
- data/ext/oj/oj.h +43 -35
- data/ext/oj/parse.c +164 -60
- data/ext/oj/parse.h +30 -31
- data/ext/oj/rails.c +119 -83
- data/ext/oj/rails.h +4 -7
- data/ext/oj/reader.c +5 -8
- data/ext/oj/reader.h +7 -10
- data/ext/oj/resolve.c +4 -7
- data/ext/oj/resolve.h +4 -7
- data/ext/oj/rxclass.c +8 -11
- data/ext/oj/rxclass.h +8 -11
- data/ext/oj/saj.c +9 -12
- data/ext/oj/scp.c +4 -7
- data/ext/oj/sparse.c +67 -33
- data/ext/oj/stream_writer.c +16 -15
- data/ext/oj/strict.c +9 -12
- data/ext/oj/string_writer.c +27 -8
- data/ext/oj/trace.c +5 -8
- data/ext/oj/trace.h +9 -12
- data/ext/oj/util.c +136 -0
- data/ext/oj/util.h +19 -0
- data/ext/oj/val_stack.c +28 -36
- data/ext/oj/val_stack.h +19 -50
- data/ext/oj/wab.c +29 -29
- data/lib/oj.rb +0 -8
- data/lib/oj/json.rb +1 -1
- data/lib/oj/mimic.rb +46 -2
- data/lib/oj/version.rb +2 -2
- data/pages/Modes.md +47 -45
- data/pages/Options.md +43 -10
- data/pages/Rails.md +60 -21
- data/pages/Security.md +1 -1
- data/test/activesupport5/abstract_unit.rb +45 -0
- data/test/activesupport5/decoding_test.rb +68 -60
- data/test/activesupport5/encoding_test.rb +111 -96
- data/test/activesupport5/encoding_test_cases.rb +33 -25
- data/test/activesupport5/test_helper.rb +43 -21
- data/test/activesupport5/time_zone_test_helpers.rb +18 -3
- data/test/activesupport6/abstract_unit.rb +44 -0
- data/test/activesupport6/decoding_test.rb +133 -0
- data/test/activesupport6/encoding_test.rb +507 -0
- data/test/activesupport6/encoding_test_cases.rb +98 -0
- data/test/activesupport6/test_common.rb +17 -0
- data/test/activesupport6/test_helper.rb +163 -0
- data/test/activesupport6/time_zone_test_helpers.rb +39 -0
- data/test/bar.rb +24 -6
- data/test/baz.rb +16 -0
- data/test/foo.rb +26 -57
- data/test/helper.rb +10 -0
- data/test/json_gem/json_common_interface_test.rb +8 -3
- data/test/json_gem/json_generator_test.rb +15 -3
- data/test/json_gem/test_helper.rb +8 -0
- data/test/prec.rb +23 -0
- data/test/sample_json.rb +1 -1
- data/test/test_compat.rb +21 -10
- data/test/test_custom.rb +135 -8
- data/test/test_integer_range.rb +1 -2
- data/test/test_object.rb +35 -2
- data/test/test_rails.rb +35 -0
- data/test/test_strict.rb +24 -1
- data/test/test_various.rb +52 -63
- data/test/test_writer.rb +19 -2
- data/test/tests.rb +1 -0
- data/test/zoo.rb +13 -0
- metadata +100 -75
data/test/test_object.rb
CHANGED
@@ -7,11 +7,12 @@ require 'helper'
|
|
7
7
|
|
8
8
|
class ObjectJuice < Minitest::Test
|
9
9
|
class Jeez
|
10
|
-
attr_accessor :x, :y
|
10
|
+
attr_accessor :x, :y, :_z
|
11
11
|
|
12
12
|
def initialize(x, y)
|
13
13
|
@x = x
|
14
14
|
@y = y
|
15
|
+
@_z = x.to_s
|
15
16
|
end
|
16
17
|
|
17
18
|
def eql?(o)
|
@@ -687,7 +688,7 @@ class ObjectJuice < Minitest::Test
|
|
687
688
|
|
688
689
|
def test_json_object_object
|
689
690
|
obj = Jeez.new(true, 58)
|
690
|
-
json = Oj.dump(obj, :
|
691
|
+
json = Oj.dump(obj, mode: :object, indent: 2, ignore_under: true)
|
691
692
|
assert(%{{
|
692
693
|
"^o":"ObjectJuice::Jeez",
|
693
694
|
"x":true,
|
@@ -793,6 +794,30 @@ class ObjectJuice < Minitest::Test
|
|
793
794
|
end
|
794
795
|
end
|
795
796
|
|
797
|
+
class SubX < Exception
|
798
|
+
def initialize
|
799
|
+
super("sub")
|
800
|
+
@xyz = 123
|
801
|
+
end
|
802
|
+
end
|
803
|
+
|
804
|
+
def test_exception_subclass
|
805
|
+
err = nil
|
806
|
+
begin
|
807
|
+
raise SubX.new
|
808
|
+
rescue Exception => e
|
809
|
+
err = e
|
810
|
+
end
|
811
|
+
json = Oj.dump(err, :mode => :object, :indent => 2)
|
812
|
+
#puts "*** #{json}"
|
813
|
+
e2 = Oj.load(json, :mode => :strict)
|
814
|
+
assert_equal(err.class.to_s, e2['^o'])
|
815
|
+
assert_equal(err.message, e2['~mesg'])
|
816
|
+
assert_equal(err.backtrace, e2['~bt'])
|
817
|
+
e2 = Oj.load(json, :mode => :object)
|
818
|
+
assert_equal(e, e2);
|
819
|
+
end
|
820
|
+
|
796
821
|
def test_range_object
|
797
822
|
Oj.default_options = { :mode => :object }
|
798
823
|
json = Oj.dump(1..7, :mode => :object, :indent => 0)
|
@@ -844,6 +869,14 @@ class ObjectJuice < Minitest::Test
|
|
844
869
|
assert_equal(a2[1].__id__, a2.__id__)
|
845
870
|
end
|
846
871
|
|
872
|
+
def test_circular_array3
|
873
|
+
a = ['^r1']
|
874
|
+
json = Oj.dump(a, mode: :object, circular: true)
|
875
|
+
assert_equal(%{["^i1","\\u005er1"]}, json)
|
876
|
+
a2 = Oj.load(json, mode: :object, circular: true)
|
877
|
+
assert_equal(a, a2)
|
878
|
+
end
|
879
|
+
|
847
880
|
def test_circular_hash2
|
848
881
|
h = { 'a' => 7 }
|
849
882
|
h['b'] = h
|
data/test/test_rails.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
$: << File.dirname(__FILE__)
|
5
|
+
|
6
|
+
require 'helper'
|
7
|
+
|
8
|
+
class RailsJuice < Minitest::Test
|
9
|
+
|
10
|
+
def test_bigdecimal_dump
|
11
|
+
orig = Oj.default_options
|
12
|
+
Oj.default_options = { mode: :rails, bigdecimal_as_decimal: true }
|
13
|
+
bd = BigDecimal('123')
|
14
|
+
json = Oj.dump(bd)
|
15
|
+
Oj.default_options = orig
|
16
|
+
|
17
|
+
assert_equal('0.123e3', json.downcase)
|
18
|
+
|
19
|
+
json = Oj.dump(bd, mode: :rails, bigdecimal_as_decimal: false)
|
20
|
+
assert_equal('"0.123e3"', json.downcase)
|
21
|
+
|
22
|
+
json = Oj.dump(bd, mode: :rails, bigdecimal_as_decimal: true)
|
23
|
+
assert_equal('0.123e3', json.downcase)
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_invalid_encoding
|
27
|
+
assert_raises(EncodingError) {
|
28
|
+
Oj.dump("\"\xf3j", mode: :rails)
|
29
|
+
}
|
30
|
+
assert_raises(EncodingError) {
|
31
|
+
Oj.dump("\xf3j", mode: :rails)
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
data/test/test_strict.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# encoding:
|
2
|
+
# encoding: utf-8
|
3
3
|
|
4
4
|
$: << File.dirname(__FILE__)
|
5
5
|
$oj_dir = File.dirname(File.expand_path(File.dirname(__FILE__)))
|
@@ -379,6 +379,29 @@ class StrictJuice < Minitest::Test
|
|
379
379
|
assert_equal([{ 'x' => 1 }, { 'y' => 2 }], results)
|
380
380
|
end
|
381
381
|
|
382
|
+
def test_invalid_decimal_dot_start
|
383
|
+
assert_raises(Oj::ParseError) {
|
384
|
+
Oj.load('.123', mode: :strict)
|
385
|
+
}
|
386
|
+
assert_raises(Oj::ParseError) {
|
387
|
+
Oj.load('-.123', mode: :strict)
|
388
|
+
}
|
389
|
+
end
|
390
|
+
|
391
|
+
def test_invalid_decimal_dot_end
|
392
|
+
json = '123.'
|
393
|
+
assert_raises(Oj::ParseError) {
|
394
|
+
Oj.load(json, mode: :strict)
|
395
|
+
}
|
396
|
+
end
|
397
|
+
|
398
|
+
def test_invalid_decimal_plus
|
399
|
+
json = '+12'
|
400
|
+
assert_raises(Oj::ParseError) {
|
401
|
+
Oj.load(json, mode: :strict)
|
402
|
+
}
|
403
|
+
end
|
404
|
+
|
382
405
|
def test_circular_hash
|
383
406
|
h = { 'a' => 7 }
|
384
407
|
h['b'] = h
|
data/test/test_various.rb
CHANGED
@@ -96,68 +96,47 @@ class Juice < Minitest::Test
|
|
96
96
|
Oj.default_options = @default_options
|
97
97
|
end
|
98
98
|
|
99
|
-
=begin
|
100
|
-
# Depending on the order the values may have changed. The set_options sets
|
101
|
-
# should cover the function itself.
|
102
|
-
def test_get_options
|
103
|
-
opts = Oj.default_options()
|
104
|
-
assert_equal({ :indent=>0,
|
105
|
-
:second_precision=>9,
|
106
|
-
:circular=>false,
|
107
|
-
:class_cache=>true,
|
108
|
-
:auto_define=>false,
|
109
|
-
:symbol_keys=>false,
|
110
|
-
:bigdecimal_as_decimal=>true,
|
111
|
-
:use_to_json=>true,
|
112
|
-
:nilnil=>false,
|
113
|
-
:allow_gc=>true,
|
114
|
-
:quirks_mode=>true,
|
115
|
-
:allow_invalid_unicode=>false,
|
116
|
-
:float_precision=>15,
|
117
|
-
:mode=>:object,
|
118
|
-
:escape_mode=>:json,
|
119
|
-
:time_format=>:unix_zone,
|
120
|
-
:bigdecimal_load=>:auto,
|
121
|
-
:create_id=>'json_class'}, opts)
|
122
|
-
end
|
123
|
-
=end
|
124
99
|
def test_set_options
|
125
100
|
orig = Oj.default_options()
|
126
101
|
alt ={
|
127
|
-
:
|
128
|
-
:
|
129
|
-
:
|
130
|
-
:
|
131
|
-
:
|
132
|
-
:
|
133
|
-
:
|
134
|
-
:
|
135
|
-
:
|
136
|
-
:
|
137
|
-
:
|
138
|
-
:
|
139
|
-
:
|
140
|
-
:
|
141
|
-
:
|
142
|
-
:
|
143
|
-
:
|
144
|
-
:
|
145
|
-
:
|
146
|
-
:
|
147
|
-
:
|
148
|
-
:
|
149
|
-
:
|
150
|
-
:
|
151
|
-
:
|
152
|
-
:
|
153
|
-
:
|
154
|
-
:
|
155
|
-
:
|
156
|
-
:
|
157
|
-
:
|
158
|
-
:
|
159
|
-
:
|
160
|
-
:
|
102
|
+
indent: " - ",
|
103
|
+
second_precision: 5,
|
104
|
+
circular: true,
|
105
|
+
class_cache: false,
|
106
|
+
auto_define: true,
|
107
|
+
symbol_keys: true,
|
108
|
+
bigdecimal_as_decimal: false,
|
109
|
+
use_to_json: false,
|
110
|
+
use_to_hash: false,
|
111
|
+
use_as_json: false,
|
112
|
+
use_raw_json: false,
|
113
|
+
nilnil: true,
|
114
|
+
empty_string: true,
|
115
|
+
allow_gc: false,
|
116
|
+
quirks_mode: false,
|
117
|
+
allow_invalid_unicode: true,
|
118
|
+
float_precision: 13,
|
119
|
+
mode: :strict,
|
120
|
+
escape_mode: :ascii,
|
121
|
+
time_format: :unix_zone,
|
122
|
+
bigdecimal_load: :float,
|
123
|
+
compat_bigdecimal: true,
|
124
|
+
create_id: 'classy',
|
125
|
+
create_additions: true,
|
126
|
+
space: 'z',
|
127
|
+
array_nl: 'a',
|
128
|
+
object_nl: 'o',
|
129
|
+
space_before: 'b',
|
130
|
+
nan: :huge,
|
131
|
+
hash_class: Hash,
|
132
|
+
omit_nil: false,
|
133
|
+
allow_nan: true,
|
134
|
+
integer_range: nil,
|
135
|
+
array_class: Array,
|
136
|
+
ignore: nil,
|
137
|
+
ignore_under: true,
|
138
|
+
trace: true,
|
139
|
+
safe: true,
|
161
140
|
}
|
162
141
|
Oj.default_options = alt
|
163
142
|
#keys = alt.keys
|
@@ -207,7 +186,6 @@ class Juice < Minitest::Test
|
|
207
186
|
n = Oj.load('-0.000012345678901234567')
|
208
187
|
assert_equal(BigDecimal, n.class)
|
209
188
|
assert_equal('-0.12345678901234567E-4', n.to_s.upcase)
|
210
|
-
|
211
189
|
end
|
212
190
|
|
213
191
|
=begin
|
@@ -420,6 +398,17 @@ class Juice < Minitest::Test
|
|
420
398
|
assert_equal('-2208987661.000000000', json)
|
421
399
|
end
|
422
400
|
|
401
|
+
def test_time_years
|
402
|
+
(-2020..2020).each { |year|
|
403
|
+
s = "%04d-03-01T15:14:13Z" % [year]
|
404
|
+
json = Oj.dump(Time.parse(s), mode: :custom, time_format: :xmlschema, second_precision: -1)
|
405
|
+
assert_equal(s, json[1..-2])
|
406
|
+
|
407
|
+
json = Oj.dump(Time.parse(s), mode: :custom, time_format: :xmlschema, second_precision: 3)
|
408
|
+
assert_equal(s[0..-2] + '.000Z', json[1..-2])
|
409
|
+
}
|
410
|
+
end
|
411
|
+
|
423
412
|
# Class
|
424
413
|
def test_class_null
|
425
414
|
json = Oj.dump(Juice, :mode => :null)
|
@@ -682,13 +671,13 @@ class Juice < Minitest::Test
|
|
682
671
|
raise e
|
683
672
|
end
|
684
673
|
}
|
685
|
-
assert_equal('first[2].third', msg.split('(')[1].split(')')[0])
|
674
|
+
assert_equal('after first[2].third', msg.split('(')[1].split(')')[0])
|
686
675
|
end
|
687
676
|
|
688
677
|
def test_bad_bignum
|
689
678
|
if '2.4.0' < RUBY_VERSION
|
690
|
-
assert_raises
|
691
|
-
Oj.load(%|{ "big": -e123456789 }
|
679
|
+
assert_raises Oj::ParseError do
|
680
|
+
Oj.load(%|{ "big": -e123456789 }|, mode: :strict)
|
692
681
|
end
|
693
682
|
end
|
694
683
|
end
|
data/test/test_writer.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# encoding:
|
2
|
+
# encoding: utf-8
|
3
3
|
|
4
4
|
$: << File.dirname(__FILE__)
|
5
5
|
|
@@ -227,6 +227,22 @@ class OjWriter < Minitest::Test
|
|
227
227
|
|
228
228
|
# Stream Writer
|
229
229
|
|
230
|
+
class SString < ::String
|
231
|
+
alias :write :concat
|
232
|
+
end
|
233
|
+
|
234
|
+
def test_stream_writer_encoding
|
235
|
+
output = SString.new.force_encoding(::Encoding::UTF_8)
|
236
|
+
w = Oj::StreamWriter.new(output, :indent => 0)
|
237
|
+
# Oddly enough, when pushing ASCII characters with UTF-8 encoding or even
|
238
|
+
# ASCII-8BIT does not change the output encoding. Pushing any non-ASCII no
|
239
|
+
# matter what the encoding changes the output encoding to ASCII-8BIT.
|
240
|
+
x = "香港" # Hong Kong
|
241
|
+
x = x.force_encoding('ASCII-8BIT')
|
242
|
+
w.push_value(x)
|
243
|
+
assert_equal(::Encoding::UTF_8, output.encoding)
|
244
|
+
end
|
245
|
+
|
230
246
|
def test_stream_writer_empty_array
|
231
247
|
output = StringIO.open("", "w+")
|
232
248
|
w = Oj::StreamWriter.new(output, :indent => 0)
|
@@ -251,7 +267,8 @@ class OjWriter < Minitest::Test
|
|
251
267
|
w.push_object("a3")
|
252
268
|
w.pop()
|
253
269
|
w.pop()
|
254
|
-
|
270
|
+
result = output.string()
|
271
|
+
assert_equal(%|{"a1":{},"a2":{"b":[7,true,"string"]},"a3":{}}\n|, result)
|
255
272
|
end
|
256
273
|
|
257
274
|
def test_stream_writer_mixed_file
|
data/test/tests.rb
CHANGED
data/test/zoo.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -79,16 +79,16 @@ extensions:
|
|
79
79
|
- ext/oj/extconf.rb
|
80
80
|
extra_rdoc_files:
|
81
81
|
- README.md
|
82
|
-
- pages/Rails.md
|
83
|
-
- pages/JsonGem.md
|
84
|
-
- pages/Encoding.md
|
85
|
-
- pages/WAB.md
|
86
|
-
- pages/Custom.md
|
87
82
|
- pages/Advanced.md
|
88
|
-
- pages/Options.md
|
89
83
|
- pages/Compatibility.md
|
84
|
+
- pages/Custom.md
|
85
|
+
- pages/Encoding.md
|
86
|
+
- pages/JsonGem.md
|
90
87
|
- pages/Modes.md
|
88
|
+
- pages/Options.md
|
89
|
+
- pages/Rails.md
|
91
90
|
- pages/Security.md
|
91
|
+
- pages/WAB.md
|
92
92
|
files:
|
93
93
|
- LICENSE
|
94
94
|
- README.md
|
@@ -139,6 +139,8 @@ files:
|
|
139
139
|
- ext/oj/string_writer.c
|
140
140
|
- ext/oj/trace.c
|
141
141
|
- ext/oj/trace.h
|
142
|
+
- ext/oj/util.c
|
143
|
+
- ext/oj/util.h
|
142
144
|
- ext/oj/val_stack.c
|
143
145
|
- ext/oj/val_stack.h
|
144
146
|
- ext/oj/wab.c
|
@@ -170,12 +172,21 @@ files:
|
|
170
172
|
- test/activesupport4/decoding_test.rb
|
171
173
|
- test/activesupport4/encoding_test.rb
|
172
174
|
- test/activesupport4/test_helper.rb
|
175
|
+
- test/activesupport5/abstract_unit.rb
|
173
176
|
- test/activesupport5/decoding_test.rb
|
174
177
|
- test/activesupport5/encoding_test.rb
|
175
178
|
- test/activesupport5/encoding_test_cases.rb
|
176
179
|
- test/activesupport5/test_helper.rb
|
177
180
|
- test/activesupport5/time_zone_test_helpers.rb
|
181
|
+
- test/activesupport6/abstract_unit.rb
|
182
|
+
- test/activesupport6/decoding_test.rb
|
183
|
+
- test/activesupport6/encoding_test.rb
|
184
|
+
- test/activesupport6/encoding_test_cases.rb
|
185
|
+
- test/activesupport6/test_common.rb
|
186
|
+
- test/activesupport6/test_helper.rb
|
187
|
+
- test/activesupport6/time_zone_test_helpers.rb
|
178
188
|
- test/bar.rb
|
189
|
+
- test/baz.rb
|
179
190
|
- test/files.rb
|
180
191
|
- test/foo.rb
|
181
192
|
- test/helper.rb
|
@@ -208,6 +219,7 @@ files:
|
|
208
219
|
- test/perf_simple.rb
|
209
220
|
- test/perf_strict.rb
|
210
221
|
- test/perf_wab.rb
|
222
|
+
- test/prec.rb
|
211
223
|
- test/sample.rb
|
212
224
|
- test/sample/change.rb
|
213
225
|
- test/sample/dir.rb
|
@@ -232,6 +244,7 @@ files:
|
|
232
244
|
- test/test_integer_range.rb
|
233
245
|
- test/test_null.rb
|
234
246
|
- test/test_object.rb
|
247
|
+
- test/test_rails.rb
|
235
248
|
- test/test_saj.rb
|
236
249
|
- test/test_scp.rb
|
237
250
|
- test/test_strict.rb
|
@@ -241,6 +254,7 @@ files:
|
|
241
254
|
- test/tests.rb
|
242
255
|
- test/tests_mimic.rb
|
243
256
|
- test/tests_mimic_addition.rb
|
257
|
+
- test/zoo.rb
|
244
258
|
homepage: http://www.ohler.com/oj
|
245
259
|
licenses:
|
246
260
|
- MIT
|
@@ -251,7 +265,7 @@ metadata:
|
|
251
265
|
homepage_uri: http://www.ohler.com/oj/
|
252
266
|
source_code_uri: https://github.com/ohler55/oj
|
253
267
|
wiki_uri: https://github.com/ohler55/oj/wiki
|
254
|
-
post_install_message:
|
268
|
+
post_install_message:
|
255
269
|
rdoc_options:
|
256
270
|
- "--title"
|
257
271
|
- Oj
|
@@ -263,94 +277,105 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
263
277
|
requirements:
|
264
278
|
- - ">="
|
265
279
|
- !ruby/object:Gem::Version
|
266
|
-
version: '2.
|
280
|
+
version: '2.4'
|
267
281
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
268
282
|
requirements:
|
269
283
|
- - ">="
|
270
284
|
- !ruby/object:Gem::Version
|
271
285
|
version: '0'
|
272
286
|
requirements: []
|
273
|
-
|
274
|
-
|
275
|
-
signing_key:
|
287
|
+
rubygems_version: 3.2.3
|
288
|
+
signing_key:
|
276
289
|
specification_version: 4
|
277
290
|
summary: A fast JSON parser and serializer.
|
278
291
|
test_files:
|
292
|
+
- test/_test_active.rb
|
293
|
+
- test/_test_active_mimic.rb
|
294
|
+
- test/_test_mimic_rails.rb
|
295
|
+
- test/activerecord/result_test.rb
|
296
|
+
- test/activesupport4/decoding_test.rb
|
297
|
+
- test/activesupport4/encoding_test.rb
|
298
|
+
- test/activesupport4/test_helper.rb
|
299
|
+
- test/activesupport5/abstract_unit.rb
|
300
|
+
- test/activesupport5/decoding_test.rb
|
301
|
+
- test/activesupport5/encoding_test.rb
|
302
|
+
- test/activesupport5/encoding_test_cases.rb
|
303
|
+
- test/activesupport5/test_helper.rb
|
304
|
+
- test/activesupport5/time_zone_test_helpers.rb
|
305
|
+
- test/activesupport6/abstract_unit.rb
|
306
|
+
- test/activesupport6/decoding_test.rb
|
307
|
+
- test/activesupport6/encoding_test.rb
|
308
|
+
- test/activesupport6/encoding_test_cases.rb
|
309
|
+
- test/activesupport6/test_common.rb
|
310
|
+
- test/activesupport6/test_helper.rb
|
311
|
+
- test/activesupport6/time_zone_test_helpers.rb
|
312
|
+
- test/bar.rb
|
313
|
+
- test/baz.rb
|
314
|
+
- test/files.rb
|
279
315
|
- test/foo.rb
|
280
|
-
- test/test_integer_range.rb
|
281
|
-
- test/test_strict.rb
|
282
|
-
- test/perf_strict.rb
|
283
|
-
- test/tests.rb
|
284
|
-
- test/perf_saj.rb
|
285
|
-
- test/test_compat.rb
|
286
316
|
- test/helper.rb
|
287
|
-
- test/
|
288
|
-
- test/
|
289
|
-
- test/
|
290
|
-
- test/
|
317
|
+
- test/isolated/shared.rb
|
318
|
+
- test/isolated/test_mimic_after.rb
|
319
|
+
- test/isolated/test_mimic_alone.rb
|
320
|
+
- test/isolated/test_mimic_as_json.rb
|
321
|
+
- test/isolated/test_mimic_before.rb
|
322
|
+
- test/isolated/test_mimic_define.rb
|
323
|
+
- test/isolated/test_mimic_rails_after.rb
|
324
|
+
- test/isolated/test_mimic_rails_before.rb
|
325
|
+
- test/isolated/test_mimic_redefine.rb
|
291
326
|
- test/json_gem/json_addition_test.rb
|
292
|
-
- test/json_gem/
|
327
|
+
- test/json_gem/json_common_interface_test.rb
|
328
|
+
- test/json_gem/json_encoding_test.rb
|
293
329
|
- test/json_gem/json_ext_parser_test.rb
|
294
|
-
- test/json_gem/
|
295
|
-
- test/json_gem/json_generic_object_test.rb
|
330
|
+
- test/json_gem/json_fixtures_test.rb
|
296
331
|
- test/json_gem/json_generator_test.rb
|
297
|
-
- test/json_gem/
|
298
|
-
- test/json_gem/json_encoding_test.rb
|
332
|
+
- test/json_gem/json_generic_object_test.rb
|
299
333
|
- test/json_gem/json_parser_test.rb
|
300
|
-
- test/
|
301
|
-
- test/
|
302
|
-
- test/
|
303
|
-
- test/
|
334
|
+
- test/json_gem/json_string_matching_test.rb
|
335
|
+
- test/json_gem/test_helper.rb
|
336
|
+
- test/perf.rb
|
337
|
+
- test/perf_compat.rb
|
338
|
+
- test/perf_fast.rb
|
339
|
+
- test/perf_file.rb
|
304
340
|
- test/perf_object.rb
|
305
|
-
- test/
|
306
|
-
- test/test_custom.rb
|
307
|
-
- test/bar.rb
|
308
|
-
- test/activesupport4/encoding_test.rb
|
309
|
-
- test/activesupport4/test_helper.rb
|
310
|
-
- test/activesupport4/decoding_test.rb
|
311
|
-
- test/sample_json.rb
|
312
|
-
- test/activesupport5/encoding_test_cases.rb
|
313
|
-
- test/activesupport5/encoding_test.rb
|
314
|
-
- test/activesupport5/time_zone_test_helpers.rb
|
315
|
-
- test/activesupport5/test_helper.rb
|
316
|
-
- test/activesupport5/decoding_test.rb
|
317
|
-
- test/test_saj.rb
|
341
|
+
- test/perf_saj.rb
|
318
342
|
- test/perf_scp.rb
|
319
|
-
- test/
|
320
|
-
- test/
|
321
|
-
- test/
|
322
|
-
- test/
|
323
|
-
- test/test_fast.rb
|
324
|
-
- test/perf_fast.rb
|
343
|
+
- test/perf_simple.rb
|
344
|
+
- test/perf_strict.rb
|
345
|
+
- test/perf_wab.rb
|
346
|
+
- test/prec.rb
|
325
347
|
- test/sample/change.rb
|
326
|
-
- test/sample/
|
348
|
+
- test/sample/dir.rb
|
327
349
|
- test/sample/doc.rb
|
328
|
-
- test/sample/shape.rb
|
329
|
-
- test/sample/layer.rb
|
330
|
-
- test/sample/group.rb
|
331
350
|
- test/sample/file.rb
|
332
|
-
- test/sample/
|
351
|
+
- test/sample/group.rb
|
333
352
|
- test/sample/hasprops.rb
|
353
|
+
- test/sample/layer.rb
|
334
354
|
- test/sample/line.rb
|
335
|
-
- test/sample/dir.rb
|
336
355
|
- test/sample/oval.rb
|
337
|
-
- test/
|
338
|
-
- test/
|
339
|
-
- test/
|
340
|
-
- test/
|
341
|
-
- test/
|
342
|
-
- test/
|
343
|
-
- test/
|
344
|
-
- test/isolated/test_mimic_define.rb
|
345
|
-
- test/isolated/test_mimic_after.rb
|
346
|
-
- test/isolated/test_mimic_rails_after.rb
|
347
|
-
- test/isolated/test_mimic_before.rb
|
348
|
-
- test/isolated/test_mimic_rails_before.rb
|
349
|
-
- test/isolated/test_mimic_redefine.rb
|
350
|
-
- test/isolated/shared.rb
|
351
|
-
- test/isolated/test_mimic_alone.rb
|
352
|
-
- test/isolated/test_mimic_as_json.rb
|
356
|
+
- test/sample/rect.rb
|
357
|
+
- test/sample/shape.rb
|
358
|
+
- test/sample/text.rb
|
359
|
+
- test/sample.rb
|
360
|
+
- test/sample_json.rb
|
361
|
+
- test/test_compat.rb
|
362
|
+
- test/test_custom.rb
|
353
363
|
- test/test_debian.rb
|
364
|
+
- test/test_fast.rb
|
365
|
+
- test/test_file.rb
|
354
366
|
- test/test_gc.rb
|
355
|
-
- test/
|
367
|
+
- test/test_hash.rb
|
368
|
+
- test/test_integer_range.rb
|
369
|
+
- test/test_null.rb
|
370
|
+
- test/test_object.rb
|
371
|
+
- test/test_rails.rb
|
372
|
+
- test/test_saj.rb
|
373
|
+
- test/test_scp.rb
|
374
|
+
- test/test_strict.rb
|
356
375
|
- test/test_various.rb
|
376
|
+
- test/test_wab.rb
|
377
|
+
- test/test_writer.rb
|
378
|
+
- test/tests.rb
|
379
|
+
- test/tests_mimic.rb
|
380
|
+
- test/tests_mimic_addition.rb
|
381
|
+
- test/zoo.rb
|