oj 2.18.5 → 3.16.11
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 +5 -5
- data/CHANGELOG.md +1452 -0
- data/README.md +53 -221
- data/RELEASE_NOTES.md +61 -0
- data/ext/oj/buf.h +54 -72
- data/ext/oj/cache.c +329 -0
- data/ext/oj/cache.h +22 -0
- data/ext/oj/cache8.c +61 -63
- data/ext/oj/cache8.h +12 -39
- data/ext/oj/circarray.c +38 -67
- data/ext/oj/circarray.h +16 -42
- data/ext/oj/code.c +214 -0
- data/ext/oj/code.h +40 -0
- data/ext/oj/compat.c +194 -110
- data/ext/oj/custom.c +1074 -0
- data/ext/oj/debug.c +126 -0
- data/ext/oj/dump.c +1276 -2494
- data/ext/oj/dump.h +110 -0
- data/ext/oj/dump_compat.c +897 -0
- data/ext/oj/dump_leaf.c +162 -0
- data/ext/oj/dump_object.c +710 -0
- data/ext/oj/dump_strict.c +399 -0
- data/ext/oj/encode.h +7 -42
- data/ext/oj/encoder.c +43 -0
- data/ext/oj/err.c +28 -53
- data/ext/oj/err.h +49 -46
- data/ext/oj/extconf.rb +33 -32
- data/ext/oj/fast.c +1082 -1098
- data/ext/oj/intern.c +313 -0
- data/ext/oj/intern.h +22 -0
- data/ext/oj/mem.c +318 -0
- data/ext/oj/mem.h +53 -0
- data/ext/oj/mimic_json.c +919 -0
- data/ext/oj/object.c +545 -625
- data/ext/oj/odd.c +158 -168
- data/ext/oj/odd.h +32 -58
- data/ext/oj/oj.c +1727 -2080
- data/ext/oj/oj.h +334 -259
- data/ext/oj/parse.c +974 -753
- data/ext/oj/parse.h +97 -90
- data/ext/oj/parser.c +1600 -0
- data/ext/oj/parser.h +103 -0
- data/ext/oj/rails.c +1478 -0
- data/ext/oj/rails.h +18 -0
- data/ext/oj/reader.c +136 -163
- data/ext/oj/reader.h +76 -112
- data/ext/oj/resolve.c +45 -94
- data/ext/oj/resolve.h +7 -34
- data/ext/oj/rxclass.c +144 -0
- data/ext/oj/rxclass.h +26 -0
- data/ext/oj/saj.c +445 -511
- data/ext/oj/saj2.c +584 -0
- data/ext/oj/saj2.h +23 -0
- data/ext/oj/scp.c +82 -143
- data/ext/oj/simd.h +10 -0
- data/ext/oj/sparse.c +749 -644
- data/ext/oj/stream_writer.c +329 -0
- data/ext/oj/strict.c +114 -112
- data/ext/oj/string_writer.c +517 -0
- data/ext/oj/trace.c +72 -0
- data/ext/oj/trace.h +55 -0
- data/ext/oj/usual.c +1218 -0
- data/ext/oj/usual.h +69 -0
- data/ext/oj/util.c +136 -0
- data/ext/oj/util.h +20 -0
- data/ext/oj/val_stack.c +75 -72
- data/ext/oj/val_stack.h +94 -127
- data/ext/oj/validate.c +46 -0
- data/ext/oj/wab.c +586 -0
- data/lib/oj/active_support_helper.rb +1 -3
- data/lib/oj/bag.rb +8 -1
- data/lib/oj/easy_hash.rb +21 -13
- data/lib/oj/error.rb +10 -12
- data/lib/oj/json.rb +188 -0
- data/lib/oj/mimic.rb +165 -26
- data/lib/oj/saj.rb +20 -6
- data/lib/oj/schandler.rb +5 -4
- data/lib/oj/state.rb +135 -0
- data/lib/oj/version.rb +2 -3
- data/lib/oj.rb +3 -31
- data/pages/Advanced.md +22 -0
- data/pages/Compatibility.md +25 -0
- data/pages/Custom.md +23 -0
- data/pages/Encoding.md +65 -0
- data/pages/InstallOptions.md +20 -0
- data/pages/JsonGem.md +94 -0
- data/pages/Modes.md +161 -0
- data/pages/Options.md +337 -0
- data/pages/Parser.md +309 -0
- data/pages/Rails.md +167 -0
- data/pages/Security.md +20 -0
- data/pages/WAB.md +13 -0
- metadata +126 -163
- data/ext/oj/hash.c +0 -163
- data/ext/oj/hash.h +0 -46
- data/ext/oj/hash_test.c +0 -512
- data/test/_test_active.rb +0 -76
- data/test/_test_active_mimic.rb +0 -96
- data/test/_test_mimic_rails.rb +0 -126
- data/test/activesupport_datetime_test.rb +0 -23
- data/test/bug.rb +0 -51
- data/test/bug2.rb +0 -10
- data/test/bug3.rb +0 -46
- data/test/bug_fast.rb +0 -32
- data/test/bug_load.rb +0 -24
- data/test/crash.rb +0 -111
- data/test/curl/curl_oj.rb +0 -46
- data/test/curl/get_oj.rb +0 -24
- data/test/curl/just_curl.rb +0 -31
- data/test/curl/just_oj.rb +0 -51
- data/test/example.rb +0 -11
- data/test/files.rb +0 -29
- data/test/foo.rb +0 -24
- data/test/helper.rb +0 -27
- data/test/io.rb +0 -48
- data/test/isolated/shared.rb +0 -310
- data/test/isolated/test_mimic_after.rb +0 -13
- data/test/isolated/test_mimic_alone.rb +0 -12
- data/test/isolated/test_mimic_as_json.rb +0 -45
- data/test/isolated/test_mimic_before.rb +0 -13
- data/test/isolated/test_mimic_define.rb +0 -28
- data/test/isolated/test_mimic_rails_after.rb +0 -22
- data/test/isolated/test_mimic_rails_before.rb +0 -21
- data/test/isolated/test_mimic_rails_datetime.rb +0 -27
- data/test/isolated/test_mimic_redefine.rb +0 -15
- data/test/mod.rb +0 -16
- data/test/perf.rb +0 -107
- data/test/perf_compat.rb +0 -128
- data/test/perf_fast.rb +0 -164
- data/test/perf_file.rb +0 -64
- data/test/perf_object.rb +0 -138
- data/test/perf_saj.rb +0 -109
- data/test/perf_scp.rb +0 -151
- data/test/perf_simple.rb +0 -287
- data/test/perf_strict.rb +0 -128
- data/test/rails.rb +0 -50
- data/test/russian.rb +0 -18
- data/test/sample/change.rb +0 -14
- data/test/sample/dir.rb +0 -19
- data/test/sample/doc.rb +0 -36
- data/test/sample/file.rb +0 -48
- data/test/sample/group.rb +0 -16
- data/test/sample/hasprops.rb +0 -16
- data/test/sample/layer.rb +0 -12
- data/test/sample/line.rb +0 -20
- data/test/sample/oval.rb +0 -10
- data/test/sample/rect.rb +0 -10
- data/test/sample/shape.rb +0 -35
- data/test/sample/text.rb +0 -20
- data/test/sample.rb +0 -55
- data/test/sample_json.rb +0 -37
- data/test/struct.rb +0 -29
- data/test/test_compat.rb +0 -398
- data/test/test_debian.rb +0 -53
- data/test/test_fast.rb +0 -458
- data/test/test_file.rb +0 -245
- data/test/test_gc.rb +0 -49
- data/test/test_hash.rb +0 -29
- data/test/test_object.rb +0 -745
- data/test/test_saj.rb +0 -186
- data/test/test_scp.rb +0 -396
- data/test/test_serializer.rb +0 -59
- data/test/test_strict.rb +0 -254
- data/test/test_various.rb +0 -1383
- data/test/test_writer.rb +0 -308
- data/test/write_timebars.rb +0 -31
data/pages/Rails.md
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
# Rails Quickstart
|
2
|
+
|
3
|
+
To universally replace Rails' use of the json gem with Oj, and also
|
4
|
+
have Oj "take over" many methods on the JSON constant (`load`, `parse`, etc.) with
|
5
|
+
their faster Oj counterparts, add this to an initializer:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
Oj.optimize_rails()
|
9
|
+
```
|
10
|
+
|
11
|
+
For more details and options, read on...
|
12
|
+
|
13
|
+
# Oj Rails Compatibility
|
14
|
+
|
15
|
+
The `:rails` mode mimics the ActiveSupport version 5 encoder. Rails and
|
16
|
+
ActiveSupport are built around the use of the `as_json(*)` method defined for
|
17
|
+
a class. Oj attempts to provide the same functionality by being a drop in
|
18
|
+
replacement with a few exceptions.
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'oj'
|
22
|
+
|
23
|
+
Oj::Rails.set_encoder()
|
24
|
+
Oj::Rails.set_decoder()
|
25
|
+
Oj::Rails.optimize()
|
26
|
+
Oj::Rails.mimic_JSON()
|
27
|
+
```
|
28
|
+
|
29
|
+
or simply call
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
Oj.optimize_rails()
|
33
|
+
```
|
34
|
+
|
35
|
+
Either of those steps will setup Oj to mimic Rails but it will not change the
|
36
|
+
default mode type as the mode type is only used when calling the Oj encoding
|
37
|
+
directly. If Rails mode is also desired then use the `Oj.default_options` to
|
38
|
+
change the default mode.
|
39
|
+
|
40
|
+
Some of the Oj options are supported as arguments to the encoder if called
|
41
|
+
from `Oj::Rails.encode()` but when using the `Oj::Rails::Encoder` class the
|
42
|
+
`encode()` method does not support optional arguments as required by the
|
43
|
+
ActiveSupport compliance guidelines. The general approach Rails takes for
|
44
|
+
configuring encoding options is to either set global values or to create a new
|
45
|
+
instance of the Encoder class and provide options in the initializer.
|
46
|
+
|
47
|
+
The globals that ActiveSupport uses for encoding are:
|
48
|
+
|
49
|
+
* `ActiveSupport::JSON::Encoding.use_standard_json_time_format`
|
50
|
+
* `ActiveSupport::JSON::Encoding.escape_html_entities_in_json`
|
51
|
+
* `ActiveSupport::JSON::Encoding.time_precision`
|
52
|
+
* `ActiveSupport::JSON::Encoding.json_encoder`
|
53
|
+
|
54
|
+
Those globals are aliased to also be accessed from the ActiveSupport module
|
55
|
+
directly so `ActiveSupport::JSON::Encoding.time_precision` can also be accessed
|
56
|
+
from `ActiveSupport.time_precision`. Oj makes use of these globals in mimicking
|
57
|
+
Rails after the `Oj::Rails.set_encode()` method is called. That also sets the
|
58
|
+
`ActiveSupport.json_encoder` to the `Oj::Rails::Encoder` class.
|
59
|
+
|
60
|
+
Options passed into a call to `to_json()` are passed to the `as_json()`
|
61
|
+
methods. These are mostly ignored by Oj and simply passed on without
|
62
|
+
modifications as per the guidelines. The exception to this are the options
|
63
|
+
specific to Oj such as the `:circular` option which it used to detect circular
|
64
|
+
references while encoding.
|
65
|
+
|
66
|
+
By default Oj acts like the ActiveSupport encoder and honors any changes in
|
67
|
+
the `as_json()` methods. There are some optimized Oj encoders for some
|
68
|
+
classes. When the optimized encoder it toggled the `as_json()` methods will not
|
69
|
+
be called for that class but instead the optimized version will be called. The
|
70
|
+
optimized version is the same as the ActiveSupport default encoding for a
|
71
|
+
given class. The optimized versions are toggled with the `optimize()` and
|
72
|
+
`deoptimize()` methods. There is a default optimized version for every class
|
73
|
+
that takes the visible attributes and encodes them but that may not be the
|
74
|
+
same as what Rails uses. Trial and error is the best approach for classes not
|
75
|
+
listed here.
|
76
|
+
|
77
|
+
The classes that can be put in optimized mode and are optimized when
|
78
|
+
`Oj::Rails.optimize` is called with no arguments are:
|
79
|
+
|
80
|
+
* Array
|
81
|
+
* BigDecimal
|
82
|
+
* Float
|
83
|
+
* Hash
|
84
|
+
* Range
|
85
|
+
* Regexp
|
86
|
+
* Time
|
87
|
+
* ActiveSupport::TimeWithZone
|
88
|
+
* ActionController::Parameters
|
89
|
+
* any class inheriting from ActiveRecord::Base
|
90
|
+
* any other class where all attributes should be dumped
|
91
|
+
|
92
|
+
The ActiveSupport decoder is the `JSON.parse()` method. Calling the
|
93
|
+
`Oj::Rails.set_decoder()` method replaces that method with the Oj equivalent.
|
94
|
+
|
95
|
+
### Usage in Rails 3
|
96
|
+
|
97
|
+
To support Rails 3 you can create a new module mixin to prepend to controllers:
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
require 'oj'
|
101
|
+
|
102
|
+
module OjJsonEncoder
|
103
|
+
def render(options = nil, extra_options = {}, &block)
|
104
|
+
if options && options.is_a?(Hash) && options[:json]
|
105
|
+
obj = options.delete(:json)
|
106
|
+
obj = Oj.dump(obj, :mode => :rails) unless obj.is_a?(String)
|
107
|
+
options[:text] = obj
|
108
|
+
response.content_type ||= Mime::JSON
|
109
|
+
end
|
110
|
+
super
|
111
|
+
end
|
112
|
+
end
|
113
|
+
```
|
114
|
+
|
115
|
+
Usage:
|
116
|
+
|
117
|
+
```ruby
|
118
|
+
class MyController < ApplicationController
|
119
|
+
prepend OjJsonEncoder
|
120
|
+
def index
|
121
|
+
render :json => { :hello => 'world' }
|
122
|
+
end
|
123
|
+
end
|
124
|
+
```
|
125
|
+
|
126
|
+
### Older Ruby Version Support (Pre 2.3.0)
|
127
|
+
|
128
|
+
If you are using an older version of Ruby, you can pin `oj` to an earlier version in your Gemfile:
|
129
|
+
|
130
|
+
```ruby
|
131
|
+
gem 'oj', '3.7.12'
|
132
|
+
```
|
133
|
+
|
134
|
+
### Notes:
|
135
|
+
|
136
|
+
1. Optimized Floats set the significant digits to 16. This is different than
|
137
|
+
Ruby which is used by the json gem and by Rails. Ruby varies the
|
138
|
+
significant digits which can be either 16 or 17 depending on the value.
|
139
|
+
|
140
|
+
2. Optimized Hashes do not collapse keys that become the same in the output. As
|
141
|
+
an example, a non-String object that has a `to_s()` method will become the
|
142
|
+
return value of the `to_s()` method in the output without checking to see if
|
143
|
+
that has already been used. This could occur is a mix of String and Symbols
|
144
|
+
are used as keys or if a other non-String objects such as Numerics are mixed
|
145
|
+
with numbers as Strings.
|
146
|
+
|
147
|
+
3. To verify Oj is being used turn on the Oj `:trace` option. Similar to the
|
148
|
+
Ruby Tracer Oj will then print out trace information. Another approach is
|
149
|
+
to turn on C extension tracing. Set `tracer = TracePoint.new(:c_call) do
|
150
|
+
|tp| p [tp.lineno, tp.event, tp.defined_class, tp.method_id] end` or, in
|
151
|
+
older Rubies, set `Tracer.display_c_call = true`.
|
152
|
+
|
153
|
+
For example:
|
154
|
+
|
155
|
+
```
|
156
|
+
require 'active_support/core_ext'
|
157
|
+
require 'active_support/json'
|
158
|
+
require 'oj'
|
159
|
+
Oj.optimize_rails
|
160
|
+
tracer.enable { Time.now.to_json }
|
161
|
+
# prints output including
|
162
|
+
....
|
163
|
+
[20, :c_call, #<Class:Oj::Rails::Encoder>, :new]
|
164
|
+
[20, :c_call, Oj::Rails::Encoder, :encode]
|
165
|
+
....
|
166
|
+
=> "\"2018-02-23T12:13:42.493-06:00\""
|
167
|
+
```
|
data/pages/Security.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Security and Optimization
|
2
|
+
|
3
|
+
Two settings in Oj are useful for parsing but do expose a vulnerability if used
|
4
|
+
from an untrusted source. Symbolized keys can cause memory to be filled with
|
5
|
+
previous versions of ruby. Ruby 2.1 and below does not garbage collect
|
6
|
+
Symbols. The same is true for auto defining classes in all versions of ruby;
|
7
|
+
memory will also be exhausted if too many classes are automatically
|
8
|
+
defined. Auto defining is a useful feature during development and from trusted
|
9
|
+
sources but it allows too many classes to be created in the object load mode and
|
10
|
+
auto defined is used with an untrusted source. The `Oj.safe_load()` method
|
11
|
+
sets and uses the most strict and safest options. It should be used by
|
12
|
+
developers who find it difficult to understand the options available in Oj.
|
13
|
+
|
14
|
+
The options in Oj are designed to provide flexibility to the developer. This
|
15
|
+
flexibility allows Objects to be serialized and deserialized. No methods are
|
16
|
+
ever called on these created Objects but that does not stop the developer from
|
17
|
+
calling methods on them. As in any system, check your inputs before working with
|
18
|
+
them. Taking an arbitrary `String` from a user and evaluating it is never a good
|
19
|
+
idea from an unsecure source. The same is true for `Object` attributes as they
|
20
|
+
are not more than `String`s. Always check inputs from untrusted sources.
|
data/pages/WAB.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# WAB mode
|
2
|
+
|
3
|
+
The `:wab` mode ignores all options except the indent option. Performance of
|
4
|
+
this mode is slightly faster than the :strict and :null modes. It is included
|
5
|
+
to support the [WABuR](https://github.com/ohler55/wabur) project.
|
6
|
+
|
7
|
+
Options other than the indentation are not supported since the encoding and
|
8
|
+
formats are defined by the API that is used to encode data being passed from
|
9
|
+
one components in a WAB system and allowing an option that would break the
|
10
|
+
data exchange is best not supported.
|
11
|
+
|
12
|
+
The mode encodes like the strict mode except the URI, Time, WAB::UUID, and
|
13
|
+
BigDecimal are supported.
|
metadata
CHANGED
@@ -1,29 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.16.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-05-30 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
13
|
+
name: bigdecimal
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0
|
20
|
-
type: :
|
18
|
+
version: '3.0'
|
19
|
+
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
|
-
- - "
|
23
|
+
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0
|
25
|
+
version: '3.0'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: ostruct
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.2'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.2'
|
27
40
|
- !ruby/object:Gem::Dependency
|
28
41
|
name: minitest
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,44 +52,95 @@ dependencies:
|
|
39
52
|
- !ruby/object:Gem::Version
|
40
53
|
version: '5'
|
41
54
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
55
|
+
name: rake-compiler
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
44
57
|
requirements:
|
45
58
|
- - ">="
|
46
59
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
60
|
+
version: '0.9'
|
61
|
+
- - "<"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '2.0'
|
48
64
|
type: :development
|
49
65
|
prerelease: false
|
50
66
|
version_requirements: !ruby/object:Gem::Requirement
|
51
67
|
requirements:
|
52
68
|
- - ">="
|
53
69
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
|
70
|
+
version: '0.9'
|
71
|
+
- - "<"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '2.0'
|
74
|
+
- !ruby/object:Gem::Dependency
|
75
|
+
name: test-unit
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '3.0'
|
81
|
+
type: :development
|
82
|
+
prerelease: false
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "~>"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '3.0'
|
88
|
+
description: The fastest JSON parser and object serializer.
|
56
89
|
email: peter@ohler.com
|
57
90
|
executables: []
|
58
91
|
extensions:
|
59
92
|
- ext/oj/extconf.rb
|
60
93
|
extra_rdoc_files:
|
61
94
|
- README.md
|
95
|
+
- LICENSE
|
96
|
+
- CHANGELOG.md
|
97
|
+
- RELEASE_NOTES.md
|
98
|
+
- pages/Advanced.md
|
99
|
+
- pages/Compatibility.md
|
100
|
+
- pages/Custom.md
|
101
|
+
- pages/Encoding.md
|
102
|
+
- pages/InstallOptions.md
|
103
|
+
- pages/JsonGem.md
|
104
|
+
- pages/Modes.md
|
105
|
+
- pages/Options.md
|
106
|
+
- pages/Parser.md
|
107
|
+
- pages/Rails.md
|
108
|
+
- pages/Security.md
|
109
|
+
- pages/WAB.md
|
62
110
|
files:
|
111
|
+
- CHANGELOG.md
|
63
112
|
- LICENSE
|
64
113
|
- README.md
|
114
|
+
- RELEASE_NOTES.md
|
65
115
|
- ext/oj/buf.h
|
116
|
+
- ext/oj/cache.c
|
117
|
+
- ext/oj/cache.h
|
66
118
|
- ext/oj/cache8.c
|
67
119
|
- ext/oj/cache8.h
|
68
120
|
- ext/oj/circarray.c
|
69
121
|
- ext/oj/circarray.h
|
122
|
+
- ext/oj/code.c
|
123
|
+
- ext/oj/code.h
|
70
124
|
- ext/oj/compat.c
|
125
|
+
- ext/oj/custom.c
|
126
|
+
- ext/oj/debug.c
|
71
127
|
- ext/oj/dump.c
|
128
|
+
- ext/oj/dump.h
|
129
|
+
- ext/oj/dump_compat.c
|
130
|
+
- ext/oj/dump_leaf.c
|
131
|
+
- ext/oj/dump_object.c
|
132
|
+
- ext/oj/dump_strict.c
|
72
133
|
- ext/oj/encode.h
|
134
|
+
- ext/oj/encoder.c
|
73
135
|
- ext/oj/err.c
|
74
136
|
- ext/oj/err.h
|
75
137
|
- ext/oj/extconf.rb
|
76
138
|
- ext/oj/fast.c
|
77
|
-
- ext/oj/
|
78
|
-
- ext/oj/
|
79
|
-
- ext/oj/
|
139
|
+
- ext/oj/intern.c
|
140
|
+
- ext/oj/intern.h
|
141
|
+
- ext/oj/mem.c
|
142
|
+
- ext/oj/mem.h
|
143
|
+
- ext/oj/mimic_json.c
|
80
144
|
- ext/oj/object.c
|
81
145
|
- ext/oj/odd.c
|
82
146
|
- ext/oj/odd.h
|
@@ -84,101 +148,72 @@ files:
|
|
84
148
|
- ext/oj/oj.h
|
85
149
|
- ext/oj/parse.c
|
86
150
|
- ext/oj/parse.h
|
151
|
+
- ext/oj/parser.c
|
152
|
+
- ext/oj/parser.h
|
153
|
+
- ext/oj/rails.c
|
154
|
+
- ext/oj/rails.h
|
87
155
|
- ext/oj/reader.c
|
88
156
|
- ext/oj/reader.h
|
89
157
|
- ext/oj/resolve.c
|
90
158
|
- ext/oj/resolve.h
|
159
|
+
- ext/oj/rxclass.c
|
160
|
+
- ext/oj/rxclass.h
|
91
161
|
- ext/oj/saj.c
|
162
|
+
- ext/oj/saj2.c
|
163
|
+
- ext/oj/saj2.h
|
92
164
|
- ext/oj/scp.c
|
165
|
+
- ext/oj/simd.h
|
93
166
|
- ext/oj/sparse.c
|
167
|
+
- ext/oj/stream_writer.c
|
94
168
|
- ext/oj/strict.c
|
169
|
+
- ext/oj/string_writer.c
|
170
|
+
- ext/oj/trace.c
|
171
|
+
- ext/oj/trace.h
|
172
|
+
- ext/oj/usual.c
|
173
|
+
- ext/oj/usual.h
|
174
|
+
- ext/oj/util.c
|
175
|
+
- ext/oj/util.h
|
95
176
|
- ext/oj/val_stack.c
|
96
177
|
- ext/oj/val_stack.h
|
178
|
+
- ext/oj/validate.c
|
179
|
+
- ext/oj/wab.c
|
97
180
|
- lib/oj.rb
|
98
181
|
- lib/oj/active_support_helper.rb
|
99
182
|
- lib/oj/bag.rb
|
100
183
|
- lib/oj/easy_hash.rb
|
101
184
|
- lib/oj/error.rb
|
185
|
+
- lib/oj/json.rb
|
102
186
|
- lib/oj/mimic.rb
|
103
187
|
- lib/oj/saj.rb
|
104
188
|
- lib/oj/schandler.rb
|
189
|
+
- lib/oj/state.rb
|
105
190
|
- lib/oj/version.rb
|
106
|
-
-
|
107
|
-
-
|
108
|
-
-
|
109
|
-
-
|
110
|
-
-
|
111
|
-
-
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
- test/curl/just_curl.rb
|
119
|
-
- test/curl/just_oj.rb
|
120
|
-
- test/example.rb
|
121
|
-
- test/files.rb
|
122
|
-
- test/foo.rb
|
123
|
-
- test/helper.rb
|
124
|
-
- test/io.rb
|
125
|
-
- test/isolated/shared.rb
|
126
|
-
- test/isolated/test_mimic_after.rb
|
127
|
-
- test/isolated/test_mimic_alone.rb
|
128
|
-
- test/isolated/test_mimic_as_json.rb
|
129
|
-
- test/isolated/test_mimic_before.rb
|
130
|
-
- test/isolated/test_mimic_define.rb
|
131
|
-
- test/isolated/test_mimic_rails_after.rb
|
132
|
-
- test/isolated/test_mimic_rails_before.rb
|
133
|
-
- test/isolated/test_mimic_rails_datetime.rb
|
134
|
-
- test/isolated/test_mimic_redefine.rb
|
135
|
-
- test/mod.rb
|
136
|
-
- test/perf.rb
|
137
|
-
- test/perf_compat.rb
|
138
|
-
- test/perf_fast.rb
|
139
|
-
- test/perf_file.rb
|
140
|
-
- test/perf_object.rb
|
141
|
-
- test/perf_saj.rb
|
142
|
-
- test/perf_scp.rb
|
143
|
-
- test/perf_simple.rb
|
144
|
-
- test/perf_strict.rb
|
145
|
-
- test/rails.rb
|
146
|
-
- test/russian.rb
|
147
|
-
- test/sample.rb
|
148
|
-
- test/sample/change.rb
|
149
|
-
- test/sample/dir.rb
|
150
|
-
- test/sample/doc.rb
|
151
|
-
- test/sample/file.rb
|
152
|
-
- test/sample/group.rb
|
153
|
-
- test/sample/hasprops.rb
|
154
|
-
- test/sample/layer.rb
|
155
|
-
- test/sample/line.rb
|
156
|
-
- test/sample/oval.rb
|
157
|
-
- test/sample/rect.rb
|
158
|
-
- test/sample/shape.rb
|
159
|
-
- test/sample/text.rb
|
160
|
-
- test/sample_json.rb
|
161
|
-
- test/struct.rb
|
162
|
-
- test/test_compat.rb
|
163
|
-
- test/test_debian.rb
|
164
|
-
- test/test_fast.rb
|
165
|
-
- test/test_file.rb
|
166
|
-
- test/test_gc.rb
|
167
|
-
- test/test_hash.rb
|
168
|
-
- test/test_object.rb
|
169
|
-
- test/test_saj.rb
|
170
|
-
- test/test_scp.rb
|
171
|
-
- test/test_serializer.rb
|
172
|
-
- test/test_strict.rb
|
173
|
-
- test/test_various.rb
|
174
|
-
- test/test_writer.rb
|
175
|
-
- test/write_timebars.rb
|
191
|
+
- pages/Advanced.md
|
192
|
+
- pages/Compatibility.md
|
193
|
+
- pages/Custom.md
|
194
|
+
- pages/Encoding.md
|
195
|
+
- pages/InstallOptions.md
|
196
|
+
- pages/JsonGem.md
|
197
|
+
- pages/Modes.md
|
198
|
+
- pages/Options.md
|
199
|
+
- pages/Parser.md
|
200
|
+
- pages/Rails.md
|
201
|
+
- pages/Security.md
|
202
|
+
- pages/WAB.md
|
176
203
|
homepage: http://www.ohler.com/oj
|
177
204
|
licenses:
|
178
205
|
- MIT
|
179
|
-
metadata:
|
180
|
-
|
206
|
+
metadata:
|
207
|
+
bug_tracker_uri: https://github.com/ohler55/oj/issues
|
208
|
+
changelog_uri: https://github.com/ohler55/oj/blob/master/CHANGELOG.md
|
209
|
+
documentation_uri: http://www.ohler.com/oj/doc/index.html
|
210
|
+
homepage_uri: http://www.ohler.com/oj/
|
211
|
+
source_code_uri: https://github.com/ohler55/oj
|
212
|
+
wiki_uri: https://github.com/ohler55/oj/wiki
|
213
|
+
rubygems_mfa_required: 'true'
|
181
214
|
rdoc_options:
|
215
|
+
- "--title"
|
216
|
+
- Oj
|
182
217
|
- "--main"
|
183
218
|
- README.md
|
184
219
|
require_paths:
|
@@ -187,86 +222,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
222
|
requirements:
|
188
223
|
- - ">="
|
189
224
|
- !ruby/object:Gem::Version
|
190
|
-
version: '
|
225
|
+
version: '2.7'
|
191
226
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
227
|
requirements:
|
193
228
|
- - ">="
|
194
229
|
- !ruby/object:Gem::Version
|
195
230
|
version: '0'
|
196
231
|
requirements: []
|
197
|
-
|
198
|
-
rubygems_version: 2.5.2
|
199
|
-
signing_key:
|
232
|
+
rubygems_version: 3.6.2
|
200
233
|
specification_version: 4
|
201
234
|
summary: A fast JSON parser and serializer.
|
202
|
-
test_files:
|
203
|
-
- test/_test_active.rb
|
204
|
-
- test/_test_active_mimic.rb
|
205
|
-
- test/_test_mimic_rails.rb
|
206
|
-
- test/activesupport_datetime_test.rb
|
207
|
-
- test/bug.rb
|
208
|
-
- test/bug2.rb
|
209
|
-
- test/bug3.rb
|
210
|
-
- test/bug_fast.rb
|
211
|
-
- test/bug_load.rb
|
212
|
-
- test/crash.rb
|
213
|
-
- test/curl/curl_oj.rb
|
214
|
-
- test/curl/get_oj.rb
|
215
|
-
- test/curl/just_curl.rb
|
216
|
-
- test/curl/just_oj.rb
|
217
|
-
- test/example.rb
|
218
|
-
- test/files.rb
|
219
|
-
- test/foo.rb
|
220
|
-
- test/helper.rb
|
221
|
-
- test/io.rb
|
222
|
-
- test/isolated/shared.rb
|
223
|
-
- test/isolated/test_mimic_after.rb
|
224
|
-
- test/isolated/test_mimic_alone.rb
|
225
|
-
- test/isolated/test_mimic_as_json.rb
|
226
|
-
- test/isolated/test_mimic_before.rb
|
227
|
-
- test/isolated/test_mimic_define.rb
|
228
|
-
- test/isolated/test_mimic_rails_after.rb
|
229
|
-
- test/isolated/test_mimic_rails_before.rb
|
230
|
-
- test/isolated/test_mimic_rails_datetime.rb
|
231
|
-
- test/isolated/test_mimic_redefine.rb
|
232
|
-
- test/mod.rb
|
233
|
-
- test/perf.rb
|
234
|
-
- test/perf_compat.rb
|
235
|
-
- test/perf_fast.rb
|
236
|
-
- test/perf_file.rb
|
237
|
-
- test/perf_object.rb
|
238
|
-
- test/perf_saj.rb
|
239
|
-
- test/perf_scp.rb
|
240
|
-
- test/perf_simple.rb
|
241
|
-
- test/perf_strict.rb
|
242
|
-
- test/rails.rb
|
243
|
-
- test/russian.rb
|
244
|
-
- test/sample/change.rb
|
245
|
-
- test/sample/dir.rb
|
246
|
-
- test/sample/doc.rb
|
247
|
-
- test/sample/file.rb
|
248
|
-
- test/sample/group.rb
|
249
|
-
- test/sample/hasprops.rb
|
250
|
-
- test/sample/layer.rb
|
251
|
-
- test/sample/line.rb
|
252
|
-
- test/sample/oval.rb
|
253
|
-
- test/sample/rect.rb
|
254
|
-
- test/sample/shape.rb
|
255
|
-
- test/sample/text.rb
|
256
|
-
- test/sample.rb
|
257
|
-
- test/sample_json.rb
|
258
|
-
- test/struct.rb
|
259
|
-
- test/test_compat.rb
|
260
|
-
- test/test_debian.rb
|
261
|
-
- test/test_fast.rb
|
262
|
-
- test/test_file.rb
|
263
|
-
- test/test_gc.rb
|
264
|
-
- test/test_hash.rb
|
265
|
-
- test/test_object.rb
|
266
|
-
- test/test_saj.rb
|
267
|
-
- test/test_scp.rb
|
268
|
-
- test/test_serializer.rb
|
269
|
-
- test/test_strict.rb
|
270
|
-
- test/test_various.rb
|
271
|
-
- test/test_writer.rb
|
272
|
-
- test/write_timebars.rb
|
235
|
+
test_files: []
|