oj 3.10.6 → 3.12.1
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 +6 -1
- data/ext/oj/buf.h +36 -68
- data/ext/oj/cache8.c +59 -62
- data/ext/oj/cache8.h +9 -36
- data/ext/oj/circarray.c +36 -42
- data/ext/oj/circarray.h +12 -13
- data/ext/oj/code.c +172 -179
- data/ext/oj/code.h +22 -24
- data/ext/oj/compat.c +176 -181
- data/ext/oj/custom.c +800 -864
- data/ext/oj/dump.c +774 -776
- data/ext/oj/dump.h +50 -55
- data/ext/oj/dump_compat.c +2 -4
- data/ext/oj/dump_leaf.c +118 -162
- data/ext/oj/dump_object.c +610 -632
- data/ext/oj/dump_strict.c +319 -331
- data/ext/oj/encode.h +4 -33
- data/ext/oj/err.c +40 -29
- data/ext/oj/err.h +25 -44
- data/ext/oj/extconf.rb +2 -1
- data/ext/oj/fast.c +1054 -1081
- data/ext/oj/hash.c +102 -97
- data/ext/oj/hash.h +10 -35
- data/ext/oj/hash_test.c +451 -472
- data/ext/oj/mimic_json.c +415 -402
- data/ext/oj/object.c +588 -532
- data/ext/oj/odd.c +124 -132
- data/ext/oj/odd.h +28 -29
- data/ext/oj/oj.c +1186 -906
- data/ext/oj/oj.h +289 -298
- data/ext/oj/parse.c +946 -870
- data/ext/oj/parse.h +81 -79
- data/ext/oj/rails.c +837 -842
- data/ext/oj/rails.h +8 -11
- data/ext/oj/reader.c +139 -147
- data/ext/oj/reader.h +68 -84
- data/ext/oj/resolve.c +44 -47
- data/ext/oj/resolve.h +4 -6
- data/ext/oj/rxclass.c +69 -73
- data/ext/oj/rxclass.h +13 -14
- data/ext/oj/saj.c +453 -484
- data/ext/oj/scp.c +88 -113
- data/ext/oj/sparse.c +783 -714
- data/ext/oj/stream_writer.c +123 -157
- data/ext/oj/strict.c +133 -106
- data/ext/oj/string_writer.c +199 -247
- data/ext/oj/trace.c +34 -41
- data/ext/oj/trace.h +15 -15
- data/ext/oj/util.c +104 -104
- data/ext/oj/util.h +4 -3
- data/ext/oj/val_stack.c +48 -76
- data/ext/oj/val_stack.h +80 -115
- data/ext/oj/wab.c +321 -325
- data/lib/oj.rb +0 -8
- data/lib/oj/bag.rb +1 -0
- data/lib/oj/easy_hash.rb +5 -4
- data/lib/oj/mimic.rb +47 -13
- data/lib/oj/version.rb +1 -1
- data/pages/Modes.md +1 -0
- data/pages/Options.md +23 -11
- data/test/activerecord/result_test.rb +7 -2
- data/test/foo.rb +8 -40
- 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/perf.rb +1 -1
- data/test/perf_scp.rb +11 -10
- data/test/perf_strict.rb +17 -23
- data/test/prec.rb +23 -0
- data/test/sample_json.rb +1 -1
- data/test/test_compat.rb +16 -3
- data/test/test_custom.rb +11 -0
- data/test/test_fast.rb +32 -2
- data/test/test_generate.rb +21 -0
- data/test/test_hash.rb +10 -0
- data/test/test_rails.rb +9 -0
- data/test/test_scp.rb +1 -1
- data/test/test_various.rb +4 -2
- metadata +89 -85
data/test/perf_strict.rb
CHANGED
@@ -15,6 +15,8 @@ $iter = 20000
|
|
15
15
|
$with_bignum = false
|
16
16
|
$with_nums = true
|
17
17
|
$size = 0
|
18
|
+
$symbolize = false
|
19
|
+
$cache_keys = true
|
18
20
|
|
19
21
|
opts = OptionParser.new
|
20
22
|
opts.on("-v", "verbose") { $verbose = true }
|
@@ -23,6 +25,8 @@ opts.on("-i", "--indent [Int]", Integer, "indentation") { |i| $indent = i }
|
|
23
25
|
opts.on("-s", "--size [Int]", Integer, "size (~Kbytes)") { |i| $size = i }
|
24
26
|
opts.on("-b", "with bignum") { $with_bignum = true }
|
25
27
|
opts.on("-n", "without numbers") { $with_nums = false }
|
28
|
+
opts.on("-z", "--symbolize", "symbolize keys") { $symbolize = true }
|
29
|
+
opts.on("-k", "--no-cache", "turn off key caching") { $cache_keys = false }
|
26
30
|
opts.on("-h", "--help", "Show this display") { puts opts; Process.exit!(0) }
|
27
31
|
files = opts.parse(ARGV)
|
28
32
|
|
@@ -51,7 +55,7 @@ else
|
|
51
55
|
}
|
52
56
|
end
|
53
57
|
|
54
|
-
Oj.default_options = { :indent => $indent, :mode => :strict }
|
58
|
+
Oj.default_options = { :indent => $indent, :mode => :strict, cache_keys: $cache_keys, cache_str: 5 }
|
55
59
|
|
56
60
|
if 0 < $size
|
57
61
|
o = $obj
|
@@ -62,9 +66,6 @@ if 0 < $size
|
|
62
66
|
end
|
63
67
|
|
64
68
|
$json = Oj.dump($obj)
|
65
|
-
$obj_json = Oj.dump($obj, :mode => :object)
|
66
|
-
#puts "*** size: #{$obj_json.size}"
|
67
|
-
#puts "*** #{$obj_json}"
|
68
69
|
$failed = {} # key is same as String used in tests later
|
69
70
|
|
70
71
|
def capture_error(tag, orig, load_key, dump_key, &blk)
|
@@ -77,8 +78,13 @@ def capture_error(tag, orig, load_key, dump_key, &blk)
|
|
77
78
|
end
|
78
79
|
|
79
80
|
# Verify that all packages dump and load correctly and return the same Object as the original.
|
80
|
-
capture_error('Oj:strict', $obj, 'load', 'dump') { |o|
|
81
|
-
|
81
|
+
capture_error('Oj:strict', $obj, 'load', 'dump') { |o|
|
82
|
+
Oj.strict_load(Oj.dump(o))
|
83
|
+
}
|
84
|
+
capture_error('Yajl', $obj, 'encode', 'parse') { |o|
|
85
|
+
require 'yajl'
|
86
|
+
Yajl::Parser.parse(Yajl::Encoder.encode(o))
|
87
|
+
}
|
82
88
|
capture_error('JSON::Ext', $obj, 'generate', 'parse') { |o|
|
83
89
|
require 'json'
|
84
90
|
require 'json/ext'
|
@@ -86,16 +92,11 @@ capture_error('JSON::Ext', $obj, 'generate', 'parse') { |o|
|
|
86
92
|
JSON.parser = JSON::Ext::Parser
|
87
93
|
JSON.parse(JSON.generate(o))
|
88
94
|
}
|
89
|
-
|
90
|
-
|
91
|
-
JSON.generator = JSON::Pure::Generator
|
92
|
-
JSON.parser = JSON::Pure::Parser
|
93
|
-
JSON.parse(JSON.generate(o))
|
94
|
-
}
|
95
|
+
|
96
|
+
Oj.default_options = { symbol_keys: $symbolize }
|
95
97
|
|
96
98
|
if $verbose
|
97
99
|
puts "json:\n#{$json}\n"
|
98
|
-
puts "object json:\n#{$obj_json}\n"
|
99
100
|
puts "Oj loaded object:\n#{Oj.strict_load($json)}\n"
|
100
101
|
puts "Yajl loaded object:\n#{Yajl::Parser.parse($json)}\n"
|
101
102
|
puts "JSON loaded object:\n#{JSON::Ext::Parser.new($json).parse}\n"
|
@@ -105,15 +106,12 @@ puts '-' * 80
|
|
105
106
|
puts "Strict Parse Performance"
|
106
107
|
perf = Perf.new()
|
107
108
|
unless $failed.has_key?('JSON::Ext')
|
108
|
-
perf.add('JSON::Ext', 'parse') { JSON.parse($json) }
|
109
|
+
perf.add('JSON::Ext', 'parse') { JSON.parse($json, symbolize_names: $symbolize) }
|
109
110
|
perf.before('JSON::Ext') { JSON.parser = JSON::Ext::Parser }
|
110
111
|
end
|
111
|
-
unless $failed.has_key?('JSON::Pure')
|
112
|
-
perf.add('JSON::Pure', 'parse') { JSON.parse($json) }
|
113
|
-
perf.before('JSON::Pure') { JSON.parser = JSON::Pure::Parser }
|
114
|
-
end
|
115
112
|
unless $failed.has_key?('Oj:strict')
|
116
113
|
perf.add('Oj:strict', 'strict_load') { Oj.strict_load($json) }
|
114
|
+
perf.add('Oj:wab', 'wab_load') { Oj.wab_load($json) }
|
117
115
|
end
|
118
116
|
perf.add('Yajl', 'parse') { Yajl::Parser.parse($json) } unless $failed.has_key?('Yajl')
|
119
117
|
perf.run($iter)
|
@@ -125,12 +123,8 @@ unless $failed.has_key?('JSON::Ext')
|
|
125
123
|
perf.add('JSON::Ext', 'dump') { JSON.generate($obj) }
|
126
124
|
perf.before('JSON::Ext') { JSON.generator = JSON::Ext::Generator }
|
127
125
|
end
|
128
|
-
unless $failed.has_key?('JSON::Pure')
|
129
|
-
perf.add('JSON::Pure', 'generate') { JSON.generate($obj) }
|
130
|
-
perf.before('JSON::Pure') { JSON.generator = JSON::Pure::Generator }
|
131
|
-
end
|
132
126
|
unless $failed.has_key?('Oj:strict')
|
133
|
-
perf.add('Oj:strict', 'dump') { Oj.dump($obj
|
127
|
+
perf.add('Oj:strict', 'dump') { Oj.dump($obj) }
|
134
128
|
end
|
135
129
|
perf.add('Yajl', 'encode') { Yajl::Encoder.encode($obj) } unless $failed.has_key?('Yajl')
|
136
130
|
perf.run($iter)
|
data/test/prec.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'oj'
|
4
|
+
|
5
|
+
extras = {"locationLng" => -97.14690769100295}
|
6
|
+
|
7
|
+
Oj.default_options = {float_precision: 17}
|
8
|
+
|
9
|
+
encoded = Oj.dump(extras)
|
10
|
+
puts encoded
|
11
|
+
puts Oj.load(encoded)
|
12
|
+
|
13
|
+
require "active_record"
|
14
|
+
|
15
|
+
Oj::Rails.set_encoder()
|
16
|
+
Oj::Rails.set_decoder()
|
17
|
+
|
18
|
+
Oj.default_options = {float_precision: 17}
|
19
|
+
# Using Oj rails encoder, gets the correct value: {"locationLng":-97.14690769100295}
|
20
|
+
encoded = ActiveSupport::JSON.encode(extras)
|
21
|
+
puts encoded
|
22
|
+
puts ActiveSupport::JSON.decode(encoded)
|
23
|
+
puts Oj.load(encoded)
|
data/test/sample_json.rb
CHANGED
data/test/test_compat.rb
CHANGED
@@ -178,7 +178,7 @@ class CompatJuice < Minitest::Test
|
|
178
178
|
assert_equal('"abc"', json)
|
179
179
|
end
|
180
180
|
|
181
|
-
def
|
181
|
+
def test_time_xml_schema
|
182
182
|
t = Time.xmlschema("2012-01-05T23:58:07.123456000+09:00")
|
183
183
|
#t = Time.local(2012, 1, 5, 23, 58, 7, 123456)
|
184
184
|
json = Oj.dump(t, :mode => :compat)
|
@@ -236,6 +236,12 @@ class CompatJuice < Minitest::Test
|
|
236
236
|
assert_equal({"a\nb" => true, "c\td" => false}, obj)
|
237
237
|
end
|
238
238
|
|
239
|
+
def test_invalid_escapes_handled
|
240
|
+
json = '{"subtext":"\"404er\” \w \k \3 \a"}'
|
241
|
+
obj = Oj.compat_load(json)
|
242
|
+
assert_equal({"subtext" => "\"404er” w k 3 a"}, obj)
|
243
|
+
end
|
244
|
+
|
239
245
|
def test_hash_escaping
|
240
246
|
json = Oj.to_json({'<>' => '<>'}, mode: :compat)
|
241
247
|
assert_equal(json, '{"<>":"<>"}')
|
@@ -271,12 +277,19 @@ class CompatJuice < Minitest::Test
|
|
271
277
|
# BigDecimal
|
272
278
|
def test_bigdecimal
|
273
279
|
# BigDecimals are dumped as strings and can not be restored to the
|
274
|
-
# original value.
|
280
|
+
# original value without using an undocumented feature of the JSON gem.
|
275
281
|
json = Oj.dump(BigDecimal('3.14159265358979323846'))
|
276
282
|
# 2.4.0 changes the exponent to lowercase
|
277
283
|
assert_equal('"0.314159265358979323846e1"', json.downcase)
|
278
284
|
end
|
279
285
|
|
286
|
+
def test_decimal_class
|
287
|
+
big = BigDecimal('3.14159265358979323846')
|
288
|
+
# :decimal_class is the undocumented feature.
|
289
|
+
json = Oj.load('3.14159265358979323846', mode: :compat, decimal_class: BigDecimal)
|
290
|
+
assert_equal(big, json)
|
291
|
+
end
|
292
|
+
|
280
293
|
def test_infinity
|
281
294
|
assert_raises(Oj::ParseError) { Oj.load('Infinity', :mode => :strict) }
|
282
295
|
x = Oj.load('Infinity', :mode => :compat)
|
@@ -284,7 +297,7 @@ class CompatJuice < Minitest::Test
|
|
284
297
|
end
|
285
298
|
|
286
299
|
# Time
|
287
|
-
def
|
300
|
+
def test_time_from_time_object
|
288
301
|
t = Time.new(2015, 1, 5, 21, 37, 7.123456, -8 * 3600)
|
289
302
|
expect = '"' + t.to_s + '"'
|
290
303
|
json = Oj.dump(t)
|
data/test/test_custom.rb
CHANGED
@@ -118,6 +118,17 @@ class CustomJuice < Minitest::Test
|
|
118
118
|
dump_and_load(-2.48e100 * 1.0e10, false)
|
119
119
|
end
|
120
120
|
|
121
|
+
def test_float_parse
|
122
|
+
f = Oj.load("12.123456789012345678", mode: :custom, bigdecimal_load: :float);
|
123
|
+
assert_equal(Float, f.class)
|
124
|
+
end
|
125
|
+
|
126
|
+
def test_float_parse_fast
|
127
|
+
f = Oj.load("12.123456789012345678", mode: :custom, bigdecimal_load: :fast);
|
128
|
+
assert_equal(Float, f.class)
|
129
|
+
assert(12.12345678901234 <= f && f < 12.12345678901236)
|
130
|
+
end
|
131
|
+
|
121
132
|
def test_nan_dump
|
122
133
|
assert_equal('null', Oj.dump(0/0.0, :nan => :null))
|
123
134
|
assert_equal('3.3e14159265358979323846', Oj.dump(0/0.0, :nan => :huge))
|
data/test/test_fast.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
|
|
@@ -279,10 +279,26 @@ class DocTest < Minitest::Test
|
|
279
279
|
['/array/1', {'num' => 3, 'string' => 'message', 'hash' => {'h2' => {'a' => [1, 2, 3]}}}],
|
280
280
|
['/array', [{'num' => 3, 'string' => 'message', 'hash' => {'h2' => {'a' => [1, 2, 3]}}}]],
|
281
281
|
['/', {'array' => [{'num' => 3, 'string' => 'message', 'hash' => {'h2' => {'a' => [1, 2, 3]}}}], 'boolean' => true}],
|
282
|
+
['/nothing', nil],
|
283
|
+
['/array/10', nil],
|
282
284
|
].each do |path,val|
|
283
|
-
|
285
|
+
if val.nil?
|
286
|
+
assert_nil(doc.fetch(path))
|
287
|
+
else
|
288
|
+
assert_equal(val, doc.fetch(path))
|
289
|
+
end
|
284
290
|
end
|
285
291
|
end
|
292
|
+
# verify empty hash and arrays return nil when a member is requested
|
293
|
+
Oj::Doc.open('{}') do |doc|
|
294
|
+
assert_nil(doc.fetch('/x'))
|
295
|
+
assert_nil(doc.fetch('/0'))
|
296
|
+
end
|
297
|
+
Oj::Doc.open('[]') do |doc|
|
298
|
+
assert_nil(doc.fetch('/x'))
|
299
|
+
assert_nil(doc.fetch('/0'))
|
300
|
+
end
|
301
|
+
|
286
302
|
end
|
287
303
|
|
288
304
|
def test_move_fetch_path
|
@@ -297,6 +313,20 @@ class DocTest < Minitest::Test
|
|
297
313
|
end
|
298
314
|
end
|
299
315
|
|
316
|
+
def test_exisits
|
317
|
+
Oj::Doc.open(@json1) do |doc|
|
318
|
+
[['/array/1', true],
|
319
|
+
['/array/1', true],
|
320
|
+
['/array/1/hash', true],
|
321
|
+
['/array/1/dash', false],
|
322
|
+
['/array/3', false],
|
323
|
+
['/nothing', false],
|
324
|
+
].each do |path,val|
|
325
|
+
assert_equal(val, doc.exists?(path))
|
326
|
+
end
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
300
330
|
def test_home
|
301
331
|
Oj::Doc.open(@json1) do |doc|
|
302
332
|
doc.move('/array/1/num')
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
$: << File.dirname(__FILE__)
|
5
|
+
$oj_dir = File.dirname(File.expand_path(File.dirname(__FILE__)))
|
6
|
+
%w(lib ext).each do |dir|
|
7
|
+
$: << File.join($oj_dir, dir)
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'minitest'
|
11
|
+
require 'minitest/autorun'
|
12
|
+
require 'oj'
|
13
|
+
|
14
|
+
class Generator < Minitest::Test
|
15
|
+
|
16
|
+
def test_before
|
17
|
+
json = Oj.generate({})
|
18
|
+
assert_equal("{}", json)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/test/test_hash.rb
CHANGED
@@ -25,5 +25,15 @@ class Hashi < Minitest::Test
|
|
25
25
|
assert_equal(3, obj[:abc])
|
26
26
|
assert_equal(3, obj.abc())
|
27
27
|
end
|
28
|
+
|
29
|
+
def test_marshal
|
30
|
+
h = Oj::EasyHash.new()
|
31
|
+
h['abc'] = 3
|
32
|
+
out = Marshal.dump(h)
|
33
|
+
|
34
|
+
obj = Marshal.load(out)
|
35
|
+
assert_equal(Oj::EasyHash, obj.class)
|
36
|
+
assert_equal(3, obj[:abc])
|
37
|
+
end
|
28
38
|
|
29
39
|
end # HashTest
|
data/test/test_rails.rb
CHANGED
@@ -23,4 +23,13 @@ class RailsJuice < Minitest::Test
|
|
23
23
|
assert_equal('0.123e3', json.downcase)
|
24
24
|
end
|
25
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
|
+
|
26
35
|
end
|
data/test/test_scp.rb
CHANGED
data/test/test_various.rb
CHANGED
@@ -120,8 +120,11 @@ class Juice < Minitest::Test
|
|
120
120
|
escape_mode: :ascii,
|
121
121
|
time_format: :unix_zone,
|
122
122
|
bigdecimal_load: :float,
|
123
|
+
compat_bigdecimal: true,
|
123
124
|
create_id: 'classy',
|
124
125
|
create_additions: true,
|
126
|
+
cache_keys: false,
|
127
|
+
cache_str: 5,
|
125
128
|
space: 'z',
|
126
129
|
array_nl: 'a',
|
127
130
|
object_nl: 'o',
|
@@ -185,7 +188,6 @@ class Juice < Minitest::Test
|
|
185
188
|
n = Oj.load('-0.000012345678901234567')
|
186
189
|
assert_equal(BigDecimal, n.class)
|
187
190
|
assert_equal('-0.12345678901234567E-4', n.to_s.upcase)
|
188
|
-
|
189
191
|
end
|
190
192
|
|
191
193
|
=begin
|
@@ -671,7 +673,7 @@ class Juice < Minitest::Test
|
|
671
673
|
raise e
|
672
674
|
end
|
673
675
|
}
|
674
|
-
assert_equal('first[2].third', msg.split('(')[1].split(')')[0])
|
676
|
+
assert_equal('after first[2].third', msg.split('(')[1].split(')')[0])
|
675
677
|
end
|
676
678
|
|
677
679
|
def test_bad_bignum
|
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.12.1
|
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-07-09 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
|
@@ -219,6 +219,7 @@ files:
|
|
219
219
|
- test/perf_simple.rb
|
220
220
|
- test/perf_strict.rb
|
221
221
|
- test/perf_wab.rb
|
222
|
+
- test/prec.rb
|
222
223
|
- test/sample.rb
|
223
224
|
- test/sample/change.rb
|
224
225
|
- test/sample/dir.rb
|
@@ -239,6 +240,7 @@ files:
|
|
239
240
|
- test/test_fast.rb
|
240
241
|
- test/test_file.rb
|
241
242
|
- test/test_gc.rb
|
243
|
+
- test/test_generate.rb
|
242
244
|
- test/test_hash.rb
|
243
245
|
- test/test_integer_range.rb
|
244
246
|
- test/test_null.rb
|
@@ -264,7 +266,7 @@ metadata:
|
|
264
266
|
homepage_uri: http://www.ohler.com/oj/
|
265
267
|
source_code_uri: https://github.com/ohler55/oj
|
266
268
|
wiki_uri: https://github.com/ohler55/oj/wiki
|
267
|
-
post_install_message:
|
269
|
+
post_install_message:
|
268
270
|
rdoc_options:
|
269
271
|
- "--title"
|
270
272
|
- Oj
|
@@ -276,104 +278,106 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
276
278
|
requirements:
|
277
279
|
- - ">="
|
278
280
|
- !ruby/object:Gem::Version
|
279
|
-
version: '2.
|
281
|
+
version: '2.4'
|
280
282
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
281
283
|
requirements:
|
282
284
|
- - ">="
|
283
285
|
- !ruby/object:Gem::Version
|
284
286
|
version: '0'
|
285
287
|
requirements: []
|
286
|
-
rubygems_version: 3.
|
287
|
-
signing_key:
|
288
|
+
rubygems_version: 3.2.3
|
289
|
+
signing_key:
|
288
290
|
specification_version: 4
|
289
291
|
summary: A fast JSON parser and serializer.
|
290
292
|
test_files:
|
293
|
+
- test/_test_active.rb
|
294
|
+
- test/_test_active_mimic.rb
|
295
|
+
- test/_test_mimic_rails.rb
|
296
|
+
- test/activerecord/result_test.rb
|
297
|
+
- test/activesupport4/decoding_test.rb
|
298
|
+
- test/activesupport4/encoding_test.rb
|
299
|
+
- test/activesupport4/test_helper.rb
|
300
|
+
- test/activesupport5/abstract_unit.rb
|
301
|
+
- test/activesupport5/decoding_test.rb
|
302
|
+
- test/activesupport5/encoding_test.rb
|
303
|
+
- test/activesupport5/encoding_test_cases.rb
|
304
|
+
- test/activesupport5/test_helper.rb
|
305
|
+
- test/activesupport5/time_zone_test_helpers.rb
|
306
|
+
- test/activesupport6/abstract_unit.rb
|
307
|
+
- test/activesupport6/decoding_test.rb
|
308
|
+
- test/activesupport6/encoding_test.rb
|
309
|
+
- test/activesupport6/encoding_test_cases.rb
|
310
|
+
- test/activesupport6/test_common.rb
|
311
|
+
- test/activesupport6/test_helper.rb
|
312
|
+
- test/activesupport6/time_zone_test_helpers.rb
|
313
|
+
- test/bar.rb
|
314
|
+
- test/baz.rb
|
315
|
+
- test/files.rb
|
291
316
|
- test/foo.rb
|
292
|
-
- test/test_integer_range.rb
|
293
|
-
- test/test_strict.rb
|
294
|
-
- test/perf_strict.rb
|
295
|
-
- test/tests.rb
|
296
|
-
- test/perf_saj.rb
|
297
|
-
- test/test_compat.rb
|
298
317
|
- test/helper.rb
|
299
|
-
- test/
|
300
|
-
- test/
|
301
|
-
- test/
|
302
|
-
- test/
|
318
|
+
- test/isolated/shared.rb
|
319
|
+
- test/isolated/test_mimic_after.rb
|
320
|
+
- test/isolated/test_mimic_alone.rb
|
321
|
+
- test/isolated/test_mimic_as_json.rb
|
322
|
+
- test/isolated/test_mimic_before.rb
|
323
|
+
- test/isolated/test_mimic_define.rb
|
324
|
+
- test/isolated/test_mimic_rails_after.rb
|
325
|
+
- test/isolated/test_mimic_rails_before.rb
|
326
|
+
- test/isolated/test_mimic_redefine.rb
|
303
327
|
- test/json_gem/json_addition_test.rb
|
304
|
-
- test/json_gem/
|
328
|
+
- test/json_gem/json_common_interface_test.rb
|
329
|
+
- test/json_gem/json_encoding_test.rb
|
305
330
|
- test/json_gem/json_ext_parser_test.rb
|
306
|
-
- test/json_gem/
|
307
|
-
- test/json_gem/json_generic_object_test.rb
|
331
|
+
- test/json_gem/json_fixtures_test.rb
|
308
332
|
- test/json_gem/json_generator_test.rb
|
309
|
-
- test/json_gem/
|
310
|
-
- test/json_gem/json_encoding_test.rb
|
333
|
+
- test/json_gem/json_generic_object_test.rb
|
311
334
|
- test/json_gem/json_parser_test.rb
|
312
|
-
- test/
|
313
|
-
- test/
|
314
|
-
- test/
|
315
|
-
- test/
|
335
|
+
- test/json_gem/json_string_matching_test.rb
|
336
|
+
- test/json_gem/test_helper.rb
|
337
|
+
- test/perf.rb
|
338
|
+
- test/perf_compat.rb
|
339
|
+
- test/perf_fast.rb
|
340
|
+
- test/perf_file.rb
|
316
341
|
- test/perf_object.rb
|
317
|
-
- test/
|
318
|
-
- test/test_custom.rb
|
319
|
-
- test/bar.rb
|
320
|
-
- test/activesupport4/encoding_test.rb
|
321
|
-
- test/activesupport4/test_helper.rb
|
322
|
-
- test/activesupport4/decoding_test.rb
|
323
|
-
- test/sample_json.rb
|
324
|
-
- test/activesupport5/encoding_test_cases.rb
|
325
|
-
- test/activesupport5/encoding_test.rb
|
326
|
-
- test/activesupport5/abstract_unit.rb
|
327
|
-
- test/activesupport5/time_zone_test_helpers.rb
|
328
|
-
- test/activesupport5/test_helper.rb
|
329
|
-
- test/activesupport5/decoding_test.rb
|
330
|
-
- test/test_saj.rb
|
342
|
+
- test/perf_saj.rb
|
331
343
|
- test/perf_scp.rb
|
332
|
-
- test/
|
333
|
-
- test/
|
334
|
-
- test/
|
335
|
-
- test/
|
336
|
-
- test/test_fast.rb
|
337
|
-
- test/perf_fast.rb
|
344
|
+
- test/perf_simple.rb
|
345
|
+
- test/perf_strict.rb
|
346
|
+
- test/perf_wab.rb
|
347
|
+
- test/prec.rb
|
338
348
|
- test/sample/change.rb
|
339
|
-
- test/sample/
|
349
|
+
- test/sample/dir.rb
|
340
350
|
- test/sample/doc.rb
|
341
|
-
- test/sample/shape.rb
|
342
|
-
- test/sample/layer.rb
|
343
|
-
- test/sample/group.rb
|
344
351
|
- test/sample/file.rb
|
345
|
-
- test/sample/
|
352
|
+
- test/sample/group.rb
|
346
353
|
- test/sample/hasprops.rb
|
354
|
+
- test/sample/layer.rb
|
347
355
|
- test/sample/line.rb
|
348
|
-
- test/sample/dir.rb
|
349
356
|
- test/sample/oval.rb
|
350
|
-
- test/
|
351
|
-
- test/
|
352
|
-
- test/
|
353
|
-
- test/
|
354
|
-
- test/
|
355
|
-
- test/
|
356
|
-
- test/
|
357
|
-
- test/test_writer.rb
|
358
|
-
- test/test_rails.rb
|
359
|
-
- test/perf.rb
|
360
|
-
- test/isolated/test_mimic_define.rb
|
361
|
-
- test/isolated/test_mimic_after.rb
|
362
|
-
- test/isolated/test_mimic_rails_after.rb
|
363
|
-
- test/isolated/test_mimic_before.rb
|
364
|
-
- test/isolated/test_mimic_rails_before.rb
|
365
|
-
- test/isolated/test_mimic_redefine.rb
|
366
|
-
- test/isolated/shared.rb
|
367
|
-
- test/isolated/test_mimic_alone.rb
|
368
|
-
- test/isolated/test_mimic_as_json.rb
|
357
|
+
- test/sample/rect.rb
|
358
|
+
- test/sample/shape.rb
|
359
|
+
- test/sample/text.rb
|
360
|
+
- test/sample.rb
|
361
|
+
- test/sample_json.rb
|
362
|
+
- test/test_compat.rb
|
363
|
+
- test/test_custom.rb
|
369
364
|
- test/test_debian.rb
|
365
|
+
- test/test_fast.rb
|
366
|
+
- test/test_file.rb
|
370
367
|
- test/test_gc.rb
|
371
|
-
- test/
|
368
|
+
- test/test_generate.rb
|
369
|
+
- test/test_hash.rb
|
370
|
+
- test/test_integer_range.rb
|
371
|
+
- test/test_null.rb
|
372
|
+
- test/test_object.rb
|
373
|
+
- test/test_rails.rb
|
374
|
+
- test/test_saj.rb
|
375
|
+
- test/test_scp.rb
|
376
|
+
- test/test_strict.rb
|
372
377
|
- test/test_various.rb
|
373
|
-
- test/
|
374
|
-
- test/
|
375
|
-
- test/
|
376
|
-
- test/
|
377
|
-
- test/
|
378
|
-
- test/
|
379
|
-
- test/activesupport6/decoding_test.rb
|
378
|
+
- test/test_wab.rb
|
379
|
+
- test/test_writer.rb
|
380
|
+
- test/tests.rb
|
381
|
+
- test/tests_mimic.rb
|
382
|
+
- test/tests_mimic_addition.rb
|
383
|
+
- test/zoo.rb
|