Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update usage of :bigdecimal_as_decimal in Rails Mode #716

Merged
merged 3 commits into from
Oct 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pages/Modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ information.
| :float_precision | Fixnum | x | x | | | | x | |
| :hash_class | Class | | | x | x | | x | |
| :ignore | Array | | | | | x | x | |
| :indent | Integer | x | x | 3 | 4 | x | x | x |
| :indent | Integer | x | x | 4 | 4 | x | x | x |
| :indent_str | String | | | x | x | | x | |
| :integer_range | Range | x | x | x | x | x | x | x |
| :match_string | Hash | | | x | x | | x | |
| :max_nesting | Fixnum | 4 | 4 | x | | 5 | 4 | |
| :max_nesting | Fixnum | 5 | 5 | x | | 5 | 5 | |
| :mode | Symbol | - | - | - | - | - | - | |
| :nan | Symbol | | | | | | x | |
| :nilnil | Boolean | | | | | | x | |
Expand Down Expand Up @@ -141,6 +141,8 @@ information.
3. By default the bigdecimal_as decimal is not set and the default encoding
for Rails is as a string. Setting the value to true will encode a
BigDecimal as a number which breaks compatibility.
Note: after version 3.11.3 both `Oj.generate` and `JSON.generate`
will not honour this option in Rails Mode, detais on https://github.com/ohler55/oj/pull/716.

4. The integer indent value in the default options will be honored by since
the json gem expects a String type the indent in calls to 'to_json()',
Expand Down