pages/Modes.md in oj-3.2.1 vs pages/Modes.md in oj-3.3.0
- old
+ new
@@ -68,56 +68,63 @@
it's own unique format for object dumping and loading. The `:compat` mode
mimic the json gem including methods called for encoding and inconsistencies
between `JSON.dump()`, `JSON.generate()`, and `JSON()`. More details on the
[{file:Custom.md}](Custom.md) page.
+## :wab Mode
+
+WAB mode ignores all options except the indent option. Performance of this
+mode is on slightly better than the :strict and :null modes. It is included to
+support the [WABuR](https://github.com/ohler55/wabur) project. More details on
+the [{file:WAB.md}](WAB.md) page.
+
## Options Matrix
Not all options are available in all modes. The options matrix identifies the
options available in each mode. An `x` in the matrix indicates the option is
supported in that mode. A number indicates the footnotes describe additional
information.
- | Option | type | :null | :strict | :compat | :rails | :object | :custom |
- | ---------------------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
- | :allow_blank | Boolean | | | 1 | 1 | | x |
- | :allow_gc | Boolean | x | x | x | x | x | x |
- | :allow_invalid_unicode | Boolean | | | | | x | x |
- | :allow_nan | Boolean | | | x | | x | x |
- | :array_class | Class | | | x | x | | x |
- | :array_nl | String | | | | | | x |
- | :ascii_only | Boolean | x | x | 2 | 2 | x | x |
- | :auto_define | Boolean | | | | | x | x |
- | :bigdecimal_as_decimal | Boolean | | | | | x | x |
- | :bigdecimal_load | Boolean | | | | | | x |
- | :circular | Boolean | x | x | x | x | x | x |
- | :class_cache | Boolean | | | | | x | x |
- | :create_additions | Boolean | | | x | x | | x |
- | :create_id | String | | | x | x | | x |
- | :empty_string | Boolean | | | | | | x |
- | :escape_mode | Symbol | | | | | | x |
- | :float_precision | Fixnum | x | x | | | | x |
- | :hash_class | Class | | | x | x | | x |
- | :indent | Integer | x | x | 3 | 3 | x | x |
- | :indent_str | String | | | x | x | | x |
- | :match_string | Hash | | | x | x | | x |
- | :max_nesting | Fixnum | 4 | 4 | x | | 4 | 4 |
- | :mode | Symbol | - | - | - | - | - | - |
- | :nan | Symbol | | | | | | x |
- | :nilnil | Boolean | | | | | | x |
- | :object_class | Class | | | x | | | x |
- | :object_nl | String | | | x | x | | x |
- | :omit_nil | Boolean | x | x | x | x | x | x |
- | :quirks_mode | Boolean | | | 5 | | | x |
- | :second_precision | Fixnum | | | | | x | x |
- | :space | String | | | x | x | | x |
- | :space_before | String | | | x | x | | x |
- | :symbol_keys | Boolean | x | x | x | x | x | x |
- | :time_format | Symbol | | | | | x | x |
- | :use_as_json | Boolean | | | | | | x |
- | :use_to_hash | Boolean | | | | | | x |
- | :use_to_json | Boolean | | | | | | x |
- ----------------------------------------------------------------------------------------------
+ | Option | type | :null | :strict | :compat | :rails | :object | :custom | :wab |
+ | ---------------------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
+ | :allow_blank | Boolean | | | 1 | 1 | | x | |
+ | :allow_gc | Boolean | x | x | x | x | x | x | |
+ | :allow_invalid_unicode | Boolean | | | | | x | x | |
+ | :allow_nan | Boolean | | | x | | x | x | |
+ | :array_class | Class | | | x | x | | x | |
+ | :array_nl | String | | | | | | x | |
+ | :ascii_only | Boolean | x | x | 2 | 2 | x | x | |
+ | :auto_define | Boolean | | | | | x | x | |
+ | :bigdecimal_as_decimal | Boolean | | | | | x | x | |
+ | :bigdecimal_load | Boolean | | | | | | x | |
+ | :circular | Boolean | x | x | x | x | x | x | |
+ | :class_cache | Boolean | | | | | x | x | |
+ | :create_additions | Boolean | | | x | x | | x | |
+ | :create_id | String | | | x | x | | x | |
+ | :empty_string | Boolean | | | | | | x | |
+ | :escape_mode | Symbol | | | | | | x | |
+ | :float_precision | Fixnum | x | x | | | | x | |
+ | :hash_class | Class | | | x | x | | x | |
+ | :indent | Integer | x | x | 3 | 3 | x | x | x |
+ | :indent_str | String | | | x | x | | x | |
+ | :match_string | Hash | | | x | x | | x | |
+ | :max_nesting | Fixnum | 4 | 4 | x | | 4 | 4 | |
+ | :mode | Symbol | - | - | - | - | - | - | |
+ | :nan | Symbol | | | | | | x | |
+ | :nilnil | Boolean | | | | | | x | |
+ | :object_class | Class | | | x | | | x | |
+ | :object_nl | String | | | x | x | | x | |
+ | :omit_nil | Boolean | x | x | x | x | x | x | |
+ | :quirks_mode | Boolean | | | 5 | | | x | |
+ | :second_precision | Fixnum | | | | | x | x | |
+ | :space | String | | | x | x | | x | |
+ | :space_before | String | | | x | x | | x | |
+ | :symbol_keys | Boolean | x | x | x | x | x | x | |
+ | :time_format | Symbol | | | | | x | x | |
+ | :use_as_json | Boolean | | | | | | x | |
+ | :use_to_hash | Boolean | | | | | | x | |
+ | :use_to_json | Boolean | | | | | | x | |
+ --------------------------------------------------------------------------------------------------------
1. :allow_blank an alias for :nilnil.
2. The :ascii_only options is an undocumented json gem option.