oj 3.10.17 → 3.10.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6089f48d996b2561868c1d0098388cb09a484b0554f713d2ba1bb6da87c90cd7
4
- data.tar.gz: 3068e3d291d958f5b0e89f95461b83fd4e766e27bc6a7be7bc6062c893802924
3
+ metadata.gz: 764f297554e1e876cb8961737a5670c943cc344651ac950128568fbeb61609ba
4
+ data.tar.gz: 318dad71cb0e6ccb7f6f86d6e5e6f76dc1a86bf4aa82f07501c772ac60f73882
5
5
  SHA512:
6
- metadata.gz: 16e0bb20797dbfcca9784c976931347086adb66b3658a8b6548c0941324e9517ae246777813d70a9434d31e9dd0591ec83363ae38b2bbd9d7c86c4ca79c9110c
7
- data.tar.gz: e1b1d8232e68addab4c44ef0c9e2bfd46ecedf2a888024bacec093f67c3b44d4b99c43770b07aebfb5242532b685fe35a2b783a13d0c22fa11748b14141ab5a1
6
+ metadata.gz: 1c6ad5cd4811b13fef7b5f2890e9335b5078cbee85ba4d8fcad6b91487c782949361b62fc8673f8b9d4bd602d738eb04e1414021f10e9c1247be347cdb4f4e50
7
+ data.tar.gz: a99166c591a9e9805fd516c4bc55a5dfc6512161560965fc44caa02a85375d3d771a0ab10ffc153ee789373e708aae207f1ee15ec3fd54a11a06c104d5b21346
@@ -8,6 +8,50 @@ end
8
8
 
9
9
  module Oj
10
10
 
11
+ ##
12
+ # Custom mode can be used to emulate the compat mode with some minor
13
+ # differences. These are the options that setup the custom mode to be like
14
+ # the compat mode.
15
+ CUSTOM_MIMIC_JSON_OPTIONS = {
16
+ allow_gc: true,
17
+ allow_invalid_unicode: false,
18
+ allow_nan: false,
19
+ array_class: nil,
20
+ array_nl: nil,
21
+ auto_define: false,
22
+ bigdecimal_as_decimal: false,
23
+ bigdecimal_load: :auto,
24
+ circular: false,
25
+ class_cache: false,
26
+ create_additions: false,
27
+ create_id: "json_class",
28
+ empty_string: false,
29
+ escape_mode: :unicode_xss,
30
+ float_precision: 0,
31
+ hash_class: nil,
32
+ ignore: nil,
33
+ ignore_under: false,
34
+ indent: 0,
35
+ integer_range: nil,
36
+ mode: :custom,
37
+ nan: :raise,
38
+ nilnil: false,
39
+ object_nl: nil,
40
+ omit_nil: false,
41
+ quirks_mode: true,
42
+ safe: false,
43
+ second_precision: 3,
44
+ space: nil,
45
+ space_before: nil,
46
+ symbol_keys: false,
47
+ time_format: :ruby,
48
+ trace: false,
49
+ use_as_json: false,
50
+ use_raw_json: false,
51
+ use_to_hash: false,
52
+ use_to_json: true,
53
+ }
54
+
11
55
  # A bit hack-ish but does the trick. The JSON.dump_default_options is a Hash
12
56
  # but in mimic we use a C struct to store defaults. This class creates a view
13
57
  # onto that struct.
@@ -38,7 +82,7 @@ module Oj
38
82
 
39
83
  jfile = File.join(d, 'json.rb')
40
84
  $LOADED_FEATURES << jfile unless $LOADED_FEATURES.include?(jfile) if File.exist?(jfile)
41
-
85
+
42
86
  Dir.glob(File.join(d, 'json', '**', '*.rb')).each do |file|
43
87
  # allow json/add/xxx to be loaded. User can override with Oj.add_to_json(xxx).
44
88
  $LOADED_FEATURES << file unless $LOADED_FEATURES.include?(file) unless file.include?('add')
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '3.10.17'
4
+ VERSION = '3.10.18'
5
5
  end
@@ -94,8 +94,8 @@ information.
94
94
  | :array_nl | String | | | | | | x | |
95
95
  | :ascii_only | Boolean | x | x | 2 | 2 | x | x | |
96
96
  | :auto_define | Boolean | | | | | x | x | |
97
- | :bigdecimal_as_decimal | Boolean | | | x | 3 | x | x | |
98
- | :bigdecimal_load | Boolean | | | | | | x | |
97
+ | :bigdecimal_as_decimal | Boolean | | | | 3 | x | x | |
98
+ | :bigdecimal_load | Boolean | | | x | | | x | |
99
99
  | :circular | Boolean | x | x | x | x | x | x | |
100
100
  | :class_cache | Boolean | | | | | x | x | |
101
101
  | :create_additions | Boolean | | | x | x | | x | |
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.10.17
4
+ version: 3.10.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2020-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  - !ruby/object:Gem::Version
285
285
  version: '0'
286
286
  requirements: []
287
- rubygems_version: 3.1.2
287
+ rubygems_version: 3.1.4
288
288
  signing_key:
289
289
  specification_version: 4
290
290
  summary: A fast JSON parser and serializer.