Sha256: 4fcb47ecc60e9ffd60646de72aeae8a7cc924d58285c5c90c2b64f7860ad5be8

Contents?: true

Size: 979 Bytes

Versions: 19

Compression:

Stored size: 979 Bytes

Contents

# Compatibility

**Ruby**

Oj is compatible with Ruby 2.4+ and RBX.
Support for JRuby has been removed as JRuby no longer supports C extensions and
there are bugs in the older versions that are not being fixed.

**Rails**

Although up until 4.1 Rails uses [multi_json](https://github.com/intridea/multi_json), an [issue in Rails](https://github.com/rails/rails/issues/9212) causes ActiveSupport to fail to make use Oj for JSON handling.
There is a
[gem to patch this](https://github.com/GoodLife/rails-patch-json-encode) for
Rails 3.2 and 4.0. As of the Oj 2.6.0 release the default behavior is to not use
the `to_json()` method unless the `:use_to_json` option is set. This provides
another work around to the rails older and newer behavior.

The latest ActiveRecord is able to work with Oj by simply using the line:

```
serialize :metadata, Oj
```

In version Rails 4.1, multi_json has been removed, and this patch is unnecessary and will no longer work.
See {file:Rails.md}.

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
oj-3.16.9 pages/Compatibility.md
oj-3.16.8 pages/Compatibility.md
oj-3.16.7 pages/Compatibility.md
oj-3.16.6 pages/Compatibility.md
oj-3.16.5 pages/Compatibility.md
oj-3.16.4 pages/Compatibility.md
oj-3.16.3 pages/Compatibility.md
oj-3.16.2 pages/Compatibility.md
oj-3.16.1 pages/Compatibility.md
oj-3.16.0 pages/Compatibility.md
oj-3.15.1 pages/Compatibility.md
oj-3.15.0 pages/Compatibility.md
oj-3.14.3 pages/Compatibility.md
oj-3.14.2 pages/Compatibility.md
oj-3.14.1 pages/Compatibility.md
oj-3.14.0 pages/Compatibility.md
oj-3.13.23 pages/Compatibility.md
oj-3.13.22 pages/Compatibility.md
oj-3.13.21 pages/Compatibility.md