oj 3.16.2 → 3.16.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/oj/version.rb +1 -1
- data/test/foo.rb +3 -9
- data/test/perf_dump.rb +1 -1
- data/test/prec.rb +4 -4
- data/test/test_parser_debug.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a6b15904386e7010fa071ecc27b8f3a6d5023c8162ea7042fc39e29c373a20a
|
4
|
+
data.tar.gz: b862e59cff0ba3a15eadec34fe807d5893c9c1d1e9fcce01ced66ab28e642181
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f186fb40ebcc3792b4949f81ce3b2efb22bee9dce9b44785eeca37cc27e25b79e8afa4fc5872232001d28a3d0b279fc222d5f7d2f8aaa091fe3a135246139b64
|
7
|
+
data.tar.gz: 9c1536bfc15eb3fe02e92d803417ef1ccce5084036aaf8df5ae2b61995a429ab8ae00be5e9b7c79e11839d781c67523ed5bc534df36a40b59dcc61db6551158f
|
data/CHANGELOG.md
CHANGED
data/lib/oj/version.rb
CHANGED
data/test/foo.rb
CHANGED
@@ -5,16 +5,10 @@ $LOAD_PATH << '.'
|
|
5
5
|
$LOAD_PATH << File.join(__dir__, '../lib')
|
6
6
|
$LOAD_PATH << File.join(__dir__, '../ext')
|
7
7
|
|
8
|
-
require 'active_support'
|
9
8
|
require 'json'
|
10
9
|
require 'oj'
|
10
|
+
require 'oj/json'
|
11
11
|
|
12
|
-
Oj.mimic_JSON
|
13
|
-
# Oj::Rails.mimic_JSON()
|
12
|
+
Oj.mimic_JSON
|
14
13
|
|
15
|
-
|
16
|
-
::JSON.parse('{ "foo": 84e }')
|
17
|
-
#::JSON.parse('{ "foo": 84eb234 }')
|
18
|
-
rescue Exception => e
|
19
|
-
puts "#{e.class}: #{e.message}"
|
20
|
-
end
|
14
|
+
JSON.parse("[]")
|
data/test/perf_dump.rb
CHANGED
@@ -28,7 +28,7 @@ opts.parse(ARGV)
|
|
28
28
|
'd' => [ true, [false, [-123_456_789, nil], 3.9676, ['Something else.', false], nil]], # mix it up array
|
29
29
|
'e' => { 'zero' => nil, 'one' => 1, 'two' => 2, 'three' => [3], 'four' => [0, 1, 2, 3, 4] }, # hash
|
30
30
|
'f' => nil, # nil
|
31
|
-
'h' => { 'a' => { 'b' => { 'c' => { 'd' => {'e' => { 'f' => { 'g' => nil }}}}}}}, # deep hash, not that deep
|
31
|
+
'h' => { 'a' => { 'b' => { 'c' => { 'd' => { 'e' => { 'f' => { 'g' => nil }}}}}}}, # deep hash, not that deep
|
32
32
|
'i' => [[[[[[[nil]]]]]]] # deep array, again, not that deep
|
33
33
|
}
|
34
34
|
|
data/test/prec.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'oj'
|
4
4
|
|
5
|
-
extras = {'locationLng' => -97.14690769100295}
|
5
|
+
extras = { 'locationLng' => -97.14690769100295 }
|
6
6
|
|
7
|
-
Oj.default_options = {float_precision: 17}
|
7
|
+
Oj.default_options = { float_precision: 17 }
|
8
8
|
|
9
9
|
encoded = Oj.dump(extras)
|
10
10
|
puts encoded
|
@@ -15,8 +15,8 @@ require 'active_record'
|
|
15
15
|
Oj::Rails.set_encoder()
|
16
16
|
Oj::Rails.set_decoder()
|
17
17
|
|
18
|
-
Oj.default_options = {float_precision: 17}
|
19
|
-
# Using Oj rails encoder, gets the correct value: {'locationLng':-97.14690769100295}
|
18
|
+
Oj.default_options = { float_precision: 17 }
|
19
|
+
# Using Oj rails encoder, gets the correct value: { 'locationLng':-97.14690769100295 }
|
20
20
|
encoded = ActiveSupport::JSON.encode(extras)
|
21
21
|
puts encoded
|
22
22
|
puts ActiveSupport::JSON.decode(encoded)
|
data/test/test_parser_debug.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.16.
|
4
|
+
version: 3.16.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bigdecimal
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -308,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
308
308
|
- !ruby/object:Gem::Version
|
309
309
|
version: '0'
|
310
310
|
requirements: []
|
311
|
-
rubygems_version: 3.4.
|
311
|
+
rubygems_version: 3.4.10
|
312
312
|
signing_key:
|
313
313
|
specification_version: 4
|
314
314
|
summary: A fast JSON parser and serializer.
|