oj 3.11.5 → 3.16.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1421 -0
- data/README.md +19 -5
- data/RELEASE_NOTES.md +61 -0
- data/ext/oj/buf.h +20 -6
- data/ext/oj/cache.c +329 -0
- data/ext/oj/cache.h +22 -0
- data/ext/oj/cache8.c +10 -9
- data/ext/oj/circarray.c +8 -6
- data/ext/oj/circarray.h +2 -2
- data/ext/oj/code.c +19 -33
- data/ext/oj/code.h +2 -2
- data/ext/oj/compat.c +27 -77
- data/ext/oj/custom.c +86 -179
- data/ext/oj/debug.c +126 -0
- data/ext/oj/dump.c +256 -249
- data/ext/oj/dump.h +26 -12
- data/ext/oj/dump_compat.c +565 -642
- data/ext/oj/dump_leaf.c +17 -63
- data/ext/oj/dump_object.c +65 -187
- data/ext/oj/dump_strict.c +27 -51
- data/ext/oj/encoder.c +43 -0
- data/ext/oj/err.c +2 -13
- data/ext/oj/err.h +24 -8
- data/ext/oj/extconf.rb +21 -6
- data/ext/oj/fast.c +149 -149
- 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 +121 -106
- data/ext/oj/object.c +85 -162
- data/ext/oj/odd.c +89 -67
- data/ext/oj/odd.h +15 -15
- data/ext/oj/oj.c +542 -411
- data/ext/oj/oj.h +99 -73
- data/ext/oj/parse.c +175 -187
- data/ext/oj/parse.h +26 -24
- data/ext/oj/parser.c +1600 -0
- data/ext/oj/parser.h +101 -0
- data/ext/oj/rails.c +112 -159
- data/ext/oj/rails.h +1 -1
- data/ext/oj/reader.c +11 -14
- data/ext/oj/reader.h +4 -2
- data/ext/oj/resolve.c +5 -24
- data/ext/oj/rxclass.c +7 -6
- data/ext/oj/rxclass.h +1 -1
- data/ext/oj/saj.c +22 -33
- data/ext/oj/saj2.c +584 -0
- data/ext/oj/saj2.h +23 -0
- data/ext/oj/scp.c +5 -28
- data/ext/oj/sparse.c +28 -72
- data/ext/oj/stream_writer.c +50 -40
- data/ext/oj/strict.c +56 -61
- data/ext/oj/string_writer.c +72 -39
- data/ext/oj/trace.h +31 -4
- data/ext/oj/usual.c +1218 -0
- data/ext/oj/usual.h +69 -0
- data/ext/oj/util.h +1 -1
- data/ext/oj/val_stack.c +14 -3
- data/ext/oj/val_stack.h +8 -7
- data/ext/oj/validate.c +46 -0
- data/ext/oj/wab.c +63 -88
- data/lib/oj/active_support_helper.rb +1 -3
- data/lib/oj/bag.rb +7 -1
- data/lib/oj/easy_hash.rb +4 -5
- data/lib/oj/error.rb +1 -2
- data/lib/oj/json.rb +162 -150
- data/lib/oj/mimic.rb +9 -7
- data/lib/oj/saj.rb +20 -6
- data/lib/oj/schandler.rb +5 -4
- data/lib/oj/state.rb +12 -8
- data/lib/oj/version.rb +1 -2
- data/lib/oj.rb +2 -0
- data/pages/Compatibility.md +1 -1
- data/pages/InstallOptions.md +20 -0
- data/pages/JsonGem.md +15 -0
- data/pages/Modes.md +8 -3
- data/pages/Options.md +43 -5
- data/pages/Parser.md +309 -0
- data/pages/Rails.md +14 -2
- data/test/_test_active.rb +8 -9
- data/test/_test_active_mimic.rb +7 -8
- data/test/_test_mimic_rails.rb +17 -20
- data/test/activerecord/result_test.rb +5 -6
- data/test/activesupport6/encoding_test.rb +63 -28
- data/test/{activesupport5 → activesupport7}/abstract_unit.rb +16 -12
- data/test/{activesupport5 → activesupport7}/decoding_test.rb +2 -10
- data/test/{activesupport5 → activesupport7}/encoding_test.rb +86 -50
- data/test/{activesupport5 → activesupport7}/encoding_test_cases.rb +6 -0
- data/test/{activesupport5 → activesupport7}/time_zone_test_helpers.rb +8 -0
- data/test/files.rb +15 -15
- data/test/foo.rb +16 -45
- data/test/helper.rb +11 -8
- data/test/isolated/shared.rb +3 -2
- data/test/json_gem/json_addition_test.rb +2 -2
- data/test/json_gem/json_common_interface_test.rb +8 -6
- data/test/json_gem/json_encoding_test.rb +0 -0
- data/test/json_gem/json_ext_parser_test.rb +1 -0
- data/test/json_gem/json_fixtures_test.rb +3 -2
- data/test/json_gem/json_generator_test.rb +56 -38
- data/test/json_gem/json_generic_object_test.rb +11 -11
- data/test/json_gem/json_parser_test.rb +54 -47
- data/test/json_gem/json_string_matching_test.rb +9 -9
- data/test/json_gem/test_helper.rb +7 -3
- data/test/mem.rb +34 -0
- data/test/perf.rb +22 -27
- data/test/perf_compat.rb +31 -33
- data/test/perf_dump.rb +50 -0
- data/test/perf_fast.rb +80 -82
- data/test/perf_file.rb +27 -29
- data/test/perf_object.rb +65 -69
- data/test/perf_once.rb +59 -0
- data/test/perf_parser.rb +183 -0
- data/test/perf_saj.rb +46 -54
- data/test/perf_scp.rb +58 -69
- data/test/perf_simple.rb +41 -39
- data/test/perf_strict.rb +74 -82
- data/test/perf_wab.rb +67 -69
- data/test/prec.rb +5 -5
- data/test/sample/change.rb +0 -1
- data/test/sample/dir.rb +0 -1
- data/test/sample/doc.rb +0 -1
- data/test/sample/file.rb +0 -1
- data/test/sample/group.rb +0 -1
- data/test/sample/hasprops.rb +0 -1
- data/test/sample/layer.rb +0 -1
- data/test/sample/rect.rb +0 -1
- data/test/sample/shape.rb +0 -1
- data/test/sample/text.rb +0 -1
- data/test/sample.rb +16 -16
- data/test/sample_json.rb +8 -8
- data/test/test_compat.rb +95 -43
- data/test/test_custom.rb +73 -51
- data/test/test_debian.rb +7 -10
- data/test/test_fast.rb +135 -79
- data/test/test_file.rb +41 -30
- data/test/test_gc.rb +16 -5
- data/test/test_generate.rb +5 -5
- data/test/test_hash.rb +5 -5
- data/test/test_integer_range.rb +9 -9
- data/test/test_null.rb +20 -20
- data/test/test_object.rb +99 -96
- data/test/test_parser.rb +11 -0
- data/test/test_parser_debug.rb +27 -0
- data/test/test_parser_saj.rb +337 -0
- data/test/test_parser_usual.rb +251 -0
- data/test/test_rails.rb +2 -2
- data/test/test_saj.rb +10 -8
- data/test/test_scp.rb +37 -39
- data/test/test_strict.rb +40 -32
- data/test/test_various.rb +165 -84
- data/test/test_wab.rb +48 -44
- data/test/test_writer.rb +47 -47
- data/test/tests.rb +13 -5
- data/test/tests_mimic.rb +12 -3
- data/test/tests_mimic_addition.rb +12 -3
- metadata +74 -128
- data/ext/oj/hash.c +0 -131
- data/ext/oj/hash.h +0 -19
- data/ext/oj/hash_test.c +0 -491
- data/test/activesupport4/decoding_test.rb +0 -108
- data/test/activesupport4/encoding_test.rb +0 -531
- data/test/activesupport4/test_helper.rb +0 -41
- data/test/activesupport5/test_helper.rb +0 -72
- data/test/bar.rb +0 -35
- data/test/baz.rb +0 -16
- data/test/zoo.rb +0 -13
data/CHANGELOG.md
ADDED
@@ -0,0 +1,1421 @@
|
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## 3.16.5 - 2024-08-07
|
4
|
+
|
5
|
+
- Fixed Oj::Parser so that block procedures work correctly.
|
6
|
+
|
7
|
+
## 3.16.4 - 2024-06-08
|
8
|
+
|
9
|
+
- Fixed Oj::Parse EOF issue on larger stream input.
|
10
|
+
|
11
|
+
## 3.16.3 - 2023-12-11
|
12
|
+
|
13
|
+
- Fixed the gemspec to allow earlier versions of the bigdecimal gem.
|
14
|
+
|
15
|
+
## 3.16.2 - 2023-12-06
|
16
|
+
|
17
|
+
- Fixed documentation formatting.
|
18
|
+
|
19
|
+
- Added option to the "usual" parser to raise an error on an empty input string.
|
20
|
+
|
21
|
+
## 3.16.1 - 2023-09-01
|
22
|
+
|
23
|
+
- Fixed exception type on number parsing. (thank you @jasonpenny)
|
24
|
+
|
25
|
+
## 3.16.0 - 2023-08-16
|
26
|
+
|
27
|
+
- Added the `float_format` option.
|
28
|
+
|
29
|
+
- Expanded the `max_nesting` option to allow integer values as well as
|
30
|
+
the previous boolean (true or nil).
|
31
|
+
|
32
|
+
- Skip nesting tests with Truffle Ruby in the json gem tests.
|
33
|
+
|
34
|
+
## 3.15.1 - 2023-07-30
|
35
|
+
|
36
|
+
- Add protection against some using `require 'oj/json`, an internal file.
|
37
|
+
|
38
|
+
- Fixed non-json errors when in compat mode.
|
39
|
+
|
40
|
+
## 3.15.0 - 2023-06-02
|
41
|
+
|
42
|
+
- Added `omit_null_byte` option when dumping.
|
43
|
+
|
44
|
+
## 3.14.3 - 2023-04-07
|
45
|
+
|
46
|
+
- Fixed compat parse with optimized Hash when parsing a JSON::GenericObject.
|
47
|
+
|
48
|
+
## 3.14.2 - 2023-02-10
|
49
|
+
|
50
|
+
- Fixed check for \0 in strings.
|
51
|
+
|
52
|
+
## 3.14.1 - 2023-02-01
|
53
|
+
|
54
|
+
- Fixed issue with uninitialized handler for Oj::Parser::Saj.
|
55
|
+
|
56
|
+
- Fixed hang on unterminated string with a \0 byte in parse.c.
|
57
|
+
|
58
|
+
## 3.14.0 - 2023-01-30
|
59
|
+
|
60
|
+
- Tracing is now a compile time option giving a 15 to 20% performance boost.
|
61
|
+
|
62
|
+
- Some cleanup in the fast parser.
|
63
|
+
|
64
|
+
## 3.13.23 - 2022-11-06
|
65
|
+
|
66
|
+
- Fixed issue with Oj::Parser extension regarding GC timeing.
|
67
|
+
|
68
|
+
## 3.13.22 - 2022-11-01
|
69
|
+
|
70
|
+
- Reorganized Oj::Parser code to allow for parser extensions in C.
|
71
|
+
|
72
|
+
## 3.13.21 - 2022-08-19
|
73
|
+
|
74
|
+
- Bug parsing big numbers fixed in the SAJ parser.
|
75
|
+
|
76
|
+
## 3.13.20 - 2022-08-07
|
77
|
+
|
78
|
+
- SSE4 made optional with a `--with-sse42` flag to the compile.
|
79
|
+
|
80
|
+
## 3.13.19 - 2022-07-29
|
81
|
+
|
82
|
+
- TruffleRuby issues resolved.
|
83
|
+
|
84
|
+
## 3.13.18 - 2022-07-25
|
85
|
+
|
86
|
+
- Fixed SSE detection at run time.
|
87
|
+
|
88
|
+
## 3.13.17 - 2022-07-15
|
89
|
+
|
90
|
+
- Fixed Oj::Parser to detect unterminated arrays and objects.
|
91
|
+
|
92
|
+
## 3.13.16 - 2022-07-06
|
93
|
+
|
94
|
+
- Added line and column as optional arguments to the Oj::Parser.saj parser.
|
95
|
+
|
96
|
+
## 3.13.15 - 2022-07-03
|
97
|
+
|
98
|
+
- Fixed issue dumping NaN value in object mode.
|
99
|
+
|
100
|
+
## 3.13.14 - 2022-06-03
|
101
|
+
|
102
|
+
- Double fclose() due to bad merger fixed by tonobo.
|
103
|
+
|
104
|
+
## 3.13.13 - 2022-05-20
|
105
|
+
|
106
|
+
- Fixed flooding stdout with debug output when dumping.
|
107
|
+
|
108
|
+
## 3.13.12 - 2022-05-20
|
109
|
+
|
110
|
+
- Fixed crash on no arguments to pretty_generate. Now raises an exception.
|
111
|
+
- Register all classes and globals.
|
112
|
+
- Fixed memory issue with dumping.
|
113
|
+
|
114
|
+
## 3.13.11 - 2022-01-05
|
115
|
+
|
116
|
+
- Fixed write blocking failures on writes to a slow stream with larger writes.
|
117
|
+
|
118
|
+
## 3.13.10 - 2021-12-12
|
119
|
+
|
120
|
+
- Fixed Oj::Doc re-entrant issue with each_child.
|
121
|
+
- Fixed each_child on empty Oj::Doc.
|
122
|
+
|
123
|
+
## 3.13.9 - 2021-10-06
|
124
|
+
|
125
|
+
- Fix mimic JSON load so that it honors the `:symbolize_names` option.
|
126
|
+
|
127
|
+
## 3.13.8 - 2021-09-27
|
128
|
+
|
129
|
+
- Fix `Oj::Doc` behaviour for inexisting path.
|
130
|
+
```ruby
|
131
|
+
Oj::Doc.open('{"foo":1}') do |doc|
|
132
|
+
doc.fetch('/foo/bar') # used to give `1`, now gives `nil`
|
133
|
+
doc.exists?('/foo/bar') # used to give `true`, now gives `false`
|
134
|
+
end
|
135
|
+
```
|
136
|
+
|
137
|
+
- Fix `Oj::Parser` handling of BigDecimal. `snprint()` does not handle `%Lg` correctly but `sprintf()` does.
|
138
|
+
|
139
|
+
## 3.13.7 - 2021-09-16
|
140
|
+
|
141
|
+
- The JSON gem allows invalid unicode so Oj, when mimicing JSON now
|
142
|
+
allows it as well. Use `:allow_invalid_unicode` to change that.
|
143
|
+
|
144
|
+
## 3.13.6 - 2021-09-11
|
145
|
+
|
146
|
+
- Fixed unicode UTF 8 parsing in string values.
|
147
|
+
|
148
|
+
- Fixed hash key allocation issue.
|
149
|
+
|
150
|
+
- The `Oj::Parser.new()` function now allows optional arguments that
|
151
|
+
set the allowed options for the mode. As an example
|
152
|
+
`Oj::Parser.new(:usual, cache_keys: true)`.
|
153
|
+
|
154
|
+
## 3.13.5 - 2021-09-08
|
155
|
+
|
156
|
+
- Assure value strings of zero length are not always cached.
|
157
|
+
|
158
|
+
## 3.13.4 - 2021-09-04
|
159
|
+
|
160
|
+
- Fixed concurrent GC issue in the cache.
|
161
|
+
|
162
|
+
## 3.13.3 - 2021-08-30
|
163
|
+
|
164
|
+
- Caches are now self adjusting and clearing so less used entries are
|
165
|
+
expunged to avoid memory growth.
|
166
|
+
|
167
|
+
- When mimicking the JSON gem the JSON::State now handles all Hash
|
168
|
+
methods. While this is different than the actually JSON gem it
|
169
|
+
avoids failing due to errors in Rails code and other gems.
|
170
|
+
|
171
|
+
## 3.13.2 - 2021-08-11
|
172
|
+
|
173
|
+
- Fixed C99 compiler errors.
|
174
|
+
|
175
|
+
## 3.13.1 - 2021-08-09
|
176
|
+
|
177
|
+
- Fixed failing build on Windows.
|
178
|
+
|
179
|
+
## 3.13.0 - 2021-08-08
|
180
|
+
|
181
|
+
- Added `Oj::Parser`, a faster parser with better option management.
|
182
|
+
|
183
|
+
- Watson1978 increasd dump performance ever more and is now a collaborator on Oj!
|
184
|
+
|
185
|
+
## 3.12.3 - 2021-08-02
|
186
|
+
|
187
|
+
- Update documents for the `:cache_keys` and `:cache_strings`.
|
188
|
+
|
189
|
+
- Watson1978 increased dump performance for rails mode.
|
190
|
+
|
191
|
+
## 3.12.2 - 2021-07-25
|
192
|
+
|
193
|
+
- Thanks to Watson1978 for the dump performance for time values.
|
194
|
+
|
195
|
+
## 3.12.1 - 2021-07-09
|
196
|
+
|
197
|
+
- Fixed `:cache_keys` not being honored in compat mode.
|
198
|
+
- Increased the cache size.
|
199
|
+
|
200
|
+
## 3.12.0 - 2021-07-05
|
201
|
+
|
202
|
+
- Added string and symbol caching options that give Oj about a 20% parse performance boost.
|
203
|
+
|
204
|
+
## 3.11.8 - 2021-07-03
|
205
|
+
|
206
|
+
- Fixed or reverted change that set the default mode when optimize_Rails was called.
|
207
|
+
|
208
|
+
## 3.11.7 - 2021-06-22
|
209
|
+
|
210
|
+
- Fixed exception type when parsing after `Oj::Rails.mimic_JSON` is called.
|
211
|
+
|
212
|
+
## 3.11.6 - 2021-06-14
|
213
|
+
|
214
|
+
- Fixed bug where `Oj::Doc#fetch` on an empty Hash or Array did not return `nil`.
|
215
|
+
|
216
|
+
- Added an `Oj::Doc#exists?` method.
|
217
|
+
|
218
|
+
- Deprecated `Oj::Doc#where?` in favor `Oj::Doc#where` or the alias, `Oj::Doc#path`.
|
219
|
+
|
220
|
+
## 3.11.5 - 2021-04-15
|
221
|
+
|
222
|
+
- Oj.generate fix introduced in previous bug fix. Oj.mimic_JSON is forced if Oj.generate is called.
|
223
|
+
|
224
|
+
## 3.11.4 - 2021-04-14
|
225
|
+
|
226
|
+
- Code re-formatted with clang-format. Thanks goes to BuonOmo for
|
227
|
+
suggesting and encouraging the use of a formatter and getting the
|
228
|
+
effort started.
|
229
|
+
|
230
|
+
- Added support for `GC.compact` on `Oj::Doc`
|
231
|
+
|
232
|
+
- Fixed compatibility issue with Rails and the JSON gem that requires
|
233
|
+
a special case when using JSON.generate versus call `to_json` on an
|
234
|
+
object.
|
235
|
+
|
236
|
+
## 3.11.3 - 2021-03-09
|
237
|
+
|
238
|
+
- Fixed `respond_to?` method on `Oj::EasyHash`.
|
239
|
+
|
240
|
+
## 3.11.2 - 2021-01-27
|
241
|
+
|
242
|
+
- Fixed JSON gem `:decimal_class` option.
|
243
|
+
|
244
|
+
## 3.11.1 - 2021-01-24
|
245
|
+
|
246
|
+
- XrXr fixed Ruby 3.0.0 object movement issue.
|
247
|
+
|
248
|
+
## 3.11.0 - 2021-01-12
|
249
|
+
|
250
|
+
- Added `:compat_bigdecimal` to support the JSON gem `:decimal_class` undocumented option.
|
251
|
+
|
252
|
+
- Reverted the use of `:bigdecimal_load` for `:compat` mode.
|
253
|
+
|
254
|
+
## 3.10.18 - 2020-12-25
|
255
|
+
|
256
|
+
- Fix modes table by marking compat mode `:bigdecimal_load` instead of `:bigdecimal_as_decimal`.
|
257
|
+
|
258
|
+
- Added `:custom` mode setting that are the same as `:compat` mode. There are some minor differences between the two setting.
|
259
|
+
|
260
|
+
## 3.10.17 - 2020-12-15
|
261
|
+
|
262
|
+
- The undocumented JSON gem option of `:decimal_class` is now
|
263
|
+
supported and the default option of `:bigdecimal_load` is also
|
264
|
+
honored in JSON.parse() and in compat mode.
|
265
|
+
|
266
|
+
- Invalid encoding detection bug fixed for rails.
|
267
|
+
|
268
|
+
## 3.10.16 - 2020-11-10
|
269
|
+
|
270
|
+
- Allow escaping any character in :compat mode to match the json gem behavior.
|
271
|
+
|
272
|
+
## 3.10.15 - 2020-10-16
|
273
|
+
|
274
|
+
Remove license from code.
|
275
|
+
|
276
|
+
## 3.10.14 - 2020-09-05
|
277
|
+
|
278
|
+
- Updated float test to check a range.
|
279
|
+
|
280
|
+
## 3.10.13 - 2020-08-28
|
281
|
+
|
282
|
+
- Removed explicit dependency on bigdecimal.
|
283
|
+
|
284
|
+
## 3.10.12 - 2020-08-20
|
285
|
+
|
286
|
+
- Another try at bracketing bigdecimal versions to 1.0 and 3.
|
287
|
+
|
288
|
+
## 3.10.11 - 2020-08-20
|
289
|
+
|
290
|
+
- Bracketed bigdecimal dependency to 1.0 and 3.
|
291
|
+
|
292
|
+
## 3.10.10 - 2020-08-20
|
293
|
+
|
294
|
+
- Backed off bigdecimal dependency to 1.0.
|
295
|
+
|
296
|
+
## 3.10.9 - 2020-08-17
|
297
|
+
|
298
|
+
- Add bigdecimal dependency to gemfile.
|
299
|
+
|
300
|
+
## 3.10.8 - 2020-07-24
|
301
|
+
|
302
|
+
- New fast option for float parsing.
|
303
|
+
|
304
|
+
- Fixes a float parse error.
|
305
|
+
|
306
|
+
## 3.10.7 - 2020-07-13
|
307
|
+
|
308
|
+
- Faster float parsing and an adjust to more closely match Ruby.
|
309
|
+
|
310
|
+
## 3.10.6 - 2020-04-04
|
311
|
+
|
312
|
+
- Correct object dump code to continue instead of return on an _ attribnute.
|
313
|
+
|
314
|
+
## 3.10.5 - 2020-03-03
|
315
|
+
|
316
|
+
- Fix test
|
317
|
+
|
318
|
+
## 3.10.4 - 2020-03-03
|
319
|
+
|
320
|
+
- Another adjustment to get Ruby floats to match Oj thanks to klaxit.
|
321
|
+
|
322
|
+
## 3.10.3 - 2020-03-01
|
323
|
+
|
324
|
+
- Fixed difference between some unicode character encoding in Rails mode.
|
325
|
+
|
326
|
+
## 3.10.2 - 2020-01-30
|
327
|
+
|
328
|
+
- Fixed circular array reference load.
|
329
|
+
|
330
|
+
## 3.10.1 - 2020-01-14
|
331
|
+
|
332
|
+
- Fixed bug where setting `ActiveSupport::JSON::Encoding.use_standard_json_time_format` before calling `Oj.optimize_rails` did not have an effect on the time format.
|
333
|
+
|
334
|
+
- Worked around the Active Support hack that branched in `to_json` depending on the class of the option argument.
|
335
|
+
|
336
|
+
- Updated for Ruby 2.7.0
|
337
|
+
|
338
|
+
## 3.10.0 - 2019-11-28
|
339
|
+
|
340
|
+
- Fixed custom mode load_file to use custom mode.
|
341
|
+
|
342
|
+
- Fixed rails mode output of IO objects
|
343
|
+
|
344
|
+
- Fixed issue #567. Second precision is forced if set to the correct number of decimals even if zero nanoseconds.
|
345
|
+
|
346
|
+
- Fixed issue #568. Dumping bigdecimal in `:rails' mode made more consistent.
|
347
|
+
|
348
|
+
- Fixed issue #569. `:compat` mode not restricts the escape mode as indicated in the documentation.
|
349
|
+
|
350
|
+
- Fixed issue #570. In `:strict` mode number parsing follows the JSON specification more closely as intended.
|
351
|
+
|
352
|
+
- Added `:ignore_under` which when true will ignore attributes that begin with a `_` when dumping in `:object` or `:custom` mode.
|
353
|
+
|
354
|
+
## 3.9.2 - 2019-10-01
|
355
|
+
|
356
|
+
- Fixed wrong exception type when mimicking the JSON gem.
|
357
|
+
|
358
|
+
## 3.9.1 - 2019-08-31
|
359
|
+
|
360
|
+
- Raise an exception on an invalid time represented as a decimal in `:object` mode.
|
361
|
+
|
362
|
+
## 3.9.0 - 2019-08-18
|
363
|
+
|
364
|
+
- Changed custom behavior when `:create_additions` is true and `:create_id` is
|
365
|
+
set to nil. Now Range, Regexp, Rational, and Complex are output as strings
|
366
|
+
instead of a JSON object with members. Setting any other value for
|
367
|
+
`:create_id`, even an empty string will result in an object being dumped.
|
368
|
+
|
369
|
+
- Detection of pthread mutex support was changed.
|
370
|
+
|
371
|
+
## 3.8.1 - 2019-07-22
|
372
|
+
|
373
|
+
- Fix replacement of JSON::Parse thanks to paracycle.
|
374
|
+
|
375
|
+
## 3.8.0 - 2019-07-17
|
376
|
+
|
377
|
+
- Fixed a buffer allocation bug for `JSON.pretty_generate`.
|
378
|
+
|
379
|
+
- Added mimic `safe` option to not include the complete JSON in a parse error message.
|
380
|
+
|
381
|
+
- Added `use_raw_json` option for `:compat` and `:rails` mode to allow better
|
382
|
+
performance on dump. StringWriter in particular has been optimized for this option.
|
383
|
+
|
384
|
+
## 3.7.12 - 2019-04-14
|
385
|
+
|
386
|
+
- The `:omit_nil` option did not work in `:rails` mode. That has been fixed.
|
387
|
+
|
388
|
+
## 3.7.11 - 2019-03-19
|
389
|
+
|
390
|
+
- Fix to Rails optimize that missed initializing the mimic JSON `:symbolize_names` value.
|
391
|
+
|
392
|
+
## 3.7.10 - 2019-03-14
|
393
|
+
|
394
|
+
- Corrected time dump so that the none-leap years after a 400 year period are correct.
|
395
|
+
|
396
|
+
## 3.7.9 - 2019-02-18
|
397
|
+
|
398
|
+
- Return correct value in `create_opt` C function.
|
399
|
+
|
400
|
+
- Return `Oj::ParseError` if an invalid big decimal string is encountered instead of an argument error
|
401
|
+
|
402
|
+
## 3.7.8 - 2019-01-21
|
403
|
+
|
404
|
+
- Replace `gmtime` with a custom function.
|
405
|
+
|
406
|
+
- Oj::Doc crash fix.
|
407
|
+
|
408
|
+
- Mark odd args to avoid GC.
|
409
|
+
|
410
|
+
## 3.7.7 - 2019-01-14
|
411
|
+
|
412
|
+
- Exception with other than a single argument initializer can now be decoded.
|
413
|
+
|
414
|
+
- StreamWriter bug fixed that forces UTF-8 when appending to a stream. Ruby likes to convert to ASCII-8BIT but forcing the append to be UTF-8 avoids that issue.
|
415
|
+
|
416
|
+
## 3.7.6 - 2018-12-30
|
417
|
+
|
418
|
+
- Changed time encoding for 32 bit to work around a Ruby bug in `rb_time_timespec()` that fails for times before 1970.
|
419
|
+
|
420
|
+
- Addressed issue #514 by changing reserved identifiers.
|
421
|
+
|
422
|
+
- Addressed issue #515 by adding return value checks on `strdup()` and `pthread_mutex_init()`.
|
423
|
+
|
424
|
+
## 3.7.5 - 2018-12-27
|
425
|
+
|
426
|
+
- Address issue #517 with a special escape table for mimicking the JSON gem.
|
427
|
+
|
428
|
+
## 3.7.4 - 2018-11-29
|
429
|
+
|
430
|
+
- Allow `+` in front of numbers in parse as well as stream parse **EXCEPT** when mimicking the JSON gem.
|
431
|
+
|
432
|
+
## 3.7.3 - 2018-11-29
|
433
|
+
|
434
|
+
- Allow `+` in front of numbers in parse as well as stream parse.
|
435
|
+
|
436
|
+
## 3.7.2 - 2018-11-29
|
437
|
+
|
438
|
+
- More tolerant float parsing to allow `123.`.
|
439
|
+
|
440
|
+
- Parse exceptions raised by user code now preserve the message content of the exception.
|
441
|
+
|
442
|
+
## 3.7.1 - 2018-11-09
|
443
|
+
|
444
|
+
- Updated to support TruffleRuby.
|
445
|
+
|
446
|
+
## 3.7.0 - 2018-10-29
|
447
|
+
|
448
|
+
- Thanks to Ziaw for adding a integer range where integers outside that range are written as strings.
|
449
|
+
|
450
|
+
## 3.6.13 - 2018-10-25
|
451
|
+
|
452
|
+
- Fixed issue where exceptions were not being cleared on parsing.
|
453
|
+
|
454
|
+
- Added addition unicode dump error information.
|
455
|
+
|
456
|
+
## 3.6.12 - 2018-10-16
|
457
|
+
|
458
|
+
- Fixed random `:omit_nil` setting with StringWriter and StreamWriter.
|
459
|
+
|
460
|
+
## 3.6.11 - 2018-09-26
|
461
|
+
|
462
|
+
- Added the JSON path to parse error messages.
|
463
|
+
|
464
|
+
- BigDecimal parse errors now return Oj::ParseError instead of ArgumentError.
|
465
|
+
|
466
|
+
## 3.6.10 - 2018-09-13
|
467
|
+
|
468
|
+
- Additional occurrences of `SYM2ID(sym)` replaced.
|
469
|
+
|
470
|
+
## 3.6.9 - 2018-09-12
|
471
|
+
|
472
|
+
- `SYM2ID(sym)` causes a memory leak. A work around is now used.
|
473
|
+
|
474
|
+
## 3.6.8 - 2018-09-08
|
475
|
+
|
476
|
+
- Stopped setting the default options when optimize rails is called as the documentation has indicated.
|
477
|
+
|
478
|
+
- In custom mode `Date` and `DateTime` instances default to use the `:time_format` option is the `:create_additions` option is false.
|
479
|
+
|
480
|
+
## 3.6.7 - 2018-08-26
|
481
|
+
|
482
|
+
- Fixed incorrect check in StreamWriter when adding raw JSON.
|
483
|
+
|
484
|
+
## 3.6.6 - 2018-08-16
|
485
|
+
|
486
|
+
- Fixed Debian build issues on several platforms.
|
487
|
+
|
488
|
+
- `oj_slash_string` is now frozen.
|
489
|
+
|
490
|
+
## 3.6.5 - 2018-07-26
|
491
|
+
|
492
|
+
- Fixed GC issue with Oj::Doc.
|
493
|
+
|
494
|
+
- Fixed issue with time encoding with Windows.
|
495
|
+
|
496
|
+
## 3.6.4 - 2018-07-10
|
497
|
+
|
498
|
+
- JSON.generate() now sets the `to_json` option as expected.
|
499
|
+
|
500
|
+
- Show `:create_additions` in the default options. It did not appear before.
|
501
|
+
|
502
|
+
## 3.6.3 - 2018-06-21
|
503
|
+
|
504
|
+
- Fixed compat dump compilation error on Windows.
|
505
|
+
|
506
|
+
## 3.6.2 - 2018-05-30
|
507
|
+
|
508
|
+
- Regex encoded correctly for rails when using `to_json`.
|
509
|
+
|
510
|
+
- ActiveSupport::TimeWithZone optimization fixed.
|
511
|
+
|
512
|
+
## 3.6.1 - 2018-05-16
|
513
|
+
|
514
|
+
- Fixed realloc bug in rails dump.
|
515
|
+
|
516
|
+
## 3.6.0 - 2018-05-01
|
517
|
+
|
518
|
+
- Add optimization for Rails ActiveRecord::Result encoding.
|
519
|
+
|
520
|
+
## 3.5.1 - 2018-04-14
|
521
|
+
|
522
|
+
- Fixed issue with \u0000 terminating keys early.
|
523
|
+
|
524
|
+
- Add trace for calls to `to_json` and 'as_json`.
|
525
|
+
|
526
|
+
## 3.5.0 - 2018-03-04
|
527
|
+
|
528
|
+
- A trace option is now available in all modes. The format roughly follows the Ruby trace format.
|
529
|
+
|
530
|
+
## 3.4.0 - 2018-01-24
|
531
|
+
|
532
|
+
- Option to ignore specific classes in :object and :custom mode added.
|
533
|
+
|
534
|
+
## 3.3.10 - 2017-12-30
|
535
|
+
|
536
|
+
- Re-activated the bigdecimal_as_decimal option in custom mode and made the selection active for Rails mode.
|
537
|
+
|
538
|
+
- Fixed bug in optimize_rails that did not optimize all classes as expected.
|
539
|
+
|
540
|
+
- Fixed warnings for Ruby 2.5.0.
|
541
|
+
|
542
|
+
## 3.3.9 - 2017-10-27
|
543
|
+
|
544
|
+
- Fixed bug where empty strings were sometimes marked as invalid.
|
545
|
+
|
546
|
+
## 3.3.8 - 2017-10-04
|
547
|
+
|
548
|
+
- Fixed Rail mimic precision bug.
|
549
|
+
|
550
|
+
## 3.3.7 - 2017-10-02
|
551
|
+
|
552
|
+
- Handle invalid unicode characters better for single byte strings.
|
553
|
+
|
554
|
+
- Parsers for empty strings handle errors more consistently.
|
555
|
+
|
556
|
+
## 3.3.6 - 2017-09-22
|
557
|
+
|
558
|
+
- Numerous fixes and cleanup to support Ruby 2.4.2.
|
559
|
+
|
560
|
+
## 3.3.5 - 2017-08-11
|
561
|
+
|
562
|
+
- Fixed a memory error when using rails string encoding of certain unicode characters.
|
563
|
+
|
564
|
+
## 3.3.4 - 2017-08-03
|
565
|
+
|
566
|
+
- Oj::Rails.mimic_JSON now uses Float for JSON.parse for large decimals instead of BigDecimal.
|
567
|
+
|
568
|
+
## 3.3.3 - 2017-08-01
|
569
|
+
|
570
|
+
- Allow nil as a second argument to parse when mimicking the json gem. This is
|
571
|
+
a special case where the gem does not raise an exception on a non-Hash
|
572
|
+
second argument.
|
573
|
+
|
574
|
+
## 3.3.2 - 2017-07-11
|
575
|
+
|
576
|
+
- Fixed Windows compile issue regarding timegm().
|
577
|
+
|
578
|
+
## 3.3.1 - 2017-07-06
|
579
|
+
|
580
|
+
- Some exceptions such as NoMethodError have an invisible attribute where the
|
581
|
+
key name is NULL. Not an empty string but NULL. That is now detected and
|
582
|
+
dealt with.
|
583
|
+
|
584
|
+
## 3.3.0 - 2017-07-05
|
585
|
+
|
586
|
+
- Added the :wab mode to support the [WABuR](https://github.com/ohler55/wabur)
|
587
|
+
project. The :wab mode only allows the indent option and is faster due to
|
588
|
+
not having to check the multitude of options the other modes support.
|
589
|
+
|
590
|
+
## 3.2.1 - 2017-07-04
|
591
|
+
|
592
|
+
- Made json gem NaN dumping more consistent.
|
593
|
+
|
594
|
+
- Fixed :null mode to not revert to strict mode.
|
595
|
+
|
596
|
+
## 3.2.0 - 2017-06-20
|
597
|
+
|
598
|
+
- A buffer_size option was added to StringWriter and StreamWriter. That option
|
599
|
+
also sets the suggested flush limit for StreamWriter.
|
600
|
+
|
601
|
+
## 3.1.4 - 2017-06-16
|
602
|
+
|
603
|
+
- :symbolize_names now works with Oj::Rails.mimic_JSON.
|
604
|
+
|
605
|
+
## 3.1.3 - 2017-06-13
|
606
|
+
|
607
|
+
- JSON.dump used the default mode instead of :compat mode. That has been fixed.
|
608
|
+
|
609
|
+
- Updated docs on Oj.mimic_JSON to note the :encoding is set to :unicode_xss and not :ascii.
|
610
|
+
|
611
|
+
## 3.1.2 - 2017-06-10
|
612
|
+
|
613
|
+
- StringWriter was passing incorrect arguments to to_json and as_json. Fixed.
|
614
|
+
|
615
|
+
- StringWriter now accepts the mode option. This means it also defaults to the
|
616
|
+
default_options mode instead of the custom mode.
|
617
|
+
|
618
|
+
- JSON.pretty_generate when in rails mode now loads the JSON::State class correctly.
|
619
|
+
|
620
|
+
## 3.1.1 - 2017-06-09
|
621
|
+
|
622
|
+
- Custom mode now honors the :create_additions option for time.
|
623
|
+
|
624
|
+
## 3.1.0 - 2017-06-04
|
625
|
+
|
626
|
+
- Added Oj::Rails.mimic_JSON which mimics the json gem when used with
|
627
|
+
ActiveSupport which monkey patches the same to_json methods does. Basically
|
628
|
+
this changes the JSON.parse and other JSON entry points for encoding and
|
629
|
+
decoding.
|
630
|
+
|
631
|
+
- Oj.optimize_rails now calls Oj::Rails.mimic_JSON.
|
632
|
+
|
633
|
+
## 3.0.11 - 2017-06-02
|
634
|
+
|
635
|
+
- If rails in required and Oj.mimic_JSON is called without calling
|
636
|
+
Oj.optimize_rails nil.to_json failed. That has been fixed.
|
637
|
+
|
638
|
+
- Fixed crash on setting create_id to nil after mimic_JSON.
|
639
|
+
|
640
|
+
## 3.0.10 - 2017-05-22
|
641
|
+
|
642
|
+
- Oj.optimize_rails failed to include Hash and Array in the optimization. It does now.
|
643
|
+
|
644
|
+
## 3.0.9 - 2017-05-17
|
645
|
+
|
646
|
+
- Missed catching invalid unicodes beginning with \xE2. Fixed.
|
647
|
+
|
648
|
+
- In :compat mode a non-string and non IO value is converted to a string with a call to to_s.
|
649
|
+
|
650
|
+
## 3.0.8 - 2017-05-16
|
651
|
+
|
652
|
+
- Float significant digits now match Ruby's unless optimized and then significant digits are set to 16.
|
653
|
+
|
654
|
+
- Rails Hash post merging of identical keys after calling as_json is preserved only for un-optimized Hashes.
|
655
|
+
|
656
|
+
- Raise an exception to match json gem behavior on invalid unicode.
|
657
|
+
|
658
|
+
## 3.0.7 - 2017-05-10
|
659
|
+
|
660
|
+
- Changed JSON.pretty_generate options to a State instead of a Hash to get the
|
661
|
+
json gen to_json method to accept formatting options.
|
662
|
+
|
663
|
+
- Added optimization for ActionController::Parameters
|
664
|
+
|
665
|
+
## 3.0.6 - 2017-05-07
|
666
|
+
|
667
|
+
- Added Oj.optimize_rails().
|
668
|
+
|
669
|
+
- Fixed argument passing bug on calls to to_json().
|
670
|
+
|
671
|
+
## 3.0.5 - 2017-05-02
|
672
|
+
|
673
|
+
- No change in the Oj::Rails.optimize() API but additional classes are now supported.
|
674
|
+
|
675
|
+
- Added ActiveSupport::TimeWithZone optimization to rails mode.
|
676
|
+
|
677
|
+
- Added ActiveRecord::Base optimization to rails mode which allows optimization of any class inheriting from ActiveRecord::Base.
|
678
|
+
|
679
|
+
## 3.0.4 - 2017-05-01
|
680
|
+
|
681
|
+
- Fixed compile problem on Windows again.
|
682
|
+
|
683
|
+
- Fixed issue with TimeWithZone not being encoded correctly when a member of an object.
|
684
|
+
|
685
|
+
## 3.0.3 - 2017-04-28
|
686
|
+
|
687
|
+
- Improved compatibility with a json gem and Rails combination when json adds are used.
|
688
|
+
|
689
|
+
- Fixed compile problem on Windows.
|
690
|
+
|
691
|
+
## 3.0.2 - 2017-04-27
|
692
|
+
|
693
|
+
- Fixed crash due to unset var with dump to Rails mode.
|
694
|
+
|
695
|
+
## 3.0.1 - 2017-04-25
|
696
|
+
|
697
|
+
- Fixed compile error with help from Dylan Johnson.
|
698
|
+
|
699
|
+
## 3.0.0 - 2017-04-24
|
700
|
+
|
701
|
+
- Major changes focused on json gem and Rails compatibility. A new :custom
|
702
|
+
mode was added as well. Starting with this release the json gem tests are
|
703
|
+
being used to test the :compat mode and the ActiveSupport 5 tests are being
|
704
|
+
used to test the :rails mode.
|
705
|
+
|
706
|
+
- Please give stereobooster a thank you for getting the tests set up and
|
707
|
+
helping out with json gem and Rails understanding. He also has some
|
708
|
+
benchmarks of Oj versus other options
|
709
|
+
[here](https://github.com/stereobooster/ruby-json-benchmark).
|
710
|
+
|
711
|
+
## 2.18.3 - 2017-03-14
|
712
|
+
|
713
|
+
- Changed to use long doubles for parsing to minimize round off errors. So PI will be accurate to more places for PI day.
|
714
|
+
|
715
|
+
## 2.18.2 - 2017-03-01
|
716
|
+
|
717
|
+
- Strict mode now allows symbol keys in hashes.
|
718
|
+
|
719
|
+
- Fixed omit_nil bug discovered by ysmazda.
|
720
|
+
|
721
|
+
## 2.18.1 - 2017-01-09
|
722
|
+
|
723
|
+
- Missing argument to dump now raises the correct arg exception and with mimic does not crash on missing argument.
|
724
|
+
- Oj::Doc paths can now contain escaped path separators so "a\/b" can match an lement name with a slash in it.
|
725
|
+
|
726
|
+
## 2.18.0 - 2016-11-26
|
727
|
+
|
728
|
+
- Rubinius compilation fixes.
|
729
|
+
- Added a separate option for as_json instead of piggy backing on the use_to_json. This changes the API slightly.
|
730
|
+
- Ready for Ruby 2.4.
|
731
|
+
- Thanks to faucct for fixing mimic to not redefine JSON::ParserError.
|
732
|
+
|
733
|
+
## 2.17.5 - 2016-10-19
|
734
|
+
|
735
|
+
- Added additional code to check for as_json arguments and recursive calls.
|
736
|
+
|
737
|
+
## 2.17.4 - 2016-09-04
|
738
|
+
|
739
|
+
- Added the ascii_only option to JSON.generate when in mimic_JSON mode so that it is consistent with the undocumented feature in the json gem.
|
740
|
+
|
741
|
+
## 2.17.3 - 2016-08-16
|
742
|
+
|
743
|
+
- Updated mimic_JSON to monkey patch OpenStruct, Range, Rational, Regexp, Struct, Symbol, and Time like the JSON gem does. Also added the JSON.create_id accessor.
|
744
|
+
|
745
|
+
## 2.17.2 - 2016-08-13
|
746
|
+
|
747
|
+
- Worked around a problem with DateTime and ActiveSupport that causes a hang when hour, minute, second, and some other methods are called from C.
|
748
|
+
|
749
|
+
## 2.17.1 - 2016-07-08
|
750
|
+
|
751
|
+
- Added an option provide an alternative Hash class for loading.
|
752
|
+
- Added the Oj::EasyHash class.
|
753
|
+
- Fixed test failures on 32 bit machines.
|
754
|
+
- Sped up mimic_JSON.
|
755
|
+
- Added an option to omit Hash and Object attributes with nil values.
|
756
|
+
|
757
|
+
## 2.16.1 - 2016-06-21
|
758
|
+
|
759
|
+
- Thanks to hsbt for fixing a compile issue with Ruby 2.4.0-preview1.
|
760
|
+
|
761
|
+
## 2.16.0 - 2016-06-19
|
762
|
+
|
763
|
+
- Added option to allow invalid unicode characters. This is not a suggested option in a majority of the cases.
|
764
|
+
- Fixed float parsing for 32 bit systems so that it does not roll over to BigDecimal until more than 15 significant digits.
|
765
|
+
|
766
|
+
## 2.15.1 - 2016-05-26
|
767
|
+
|
768
|
+
- Fixed bug with activerecord when to_json returns an array instead of a string.
|
769
|
+
|
770
|
+
## 2.15.0 - 2016-03-28
|
771
|
+
|
772
|
+
- Fixed bug where encoded strings could be GCed.
|
773
|
+
- :nan option added for dumping Infinity, -Infinity, and NaN. This is an edition to the API. The default value for the :non option is :auto which uses the previous NaN handling on dumping of non-object modes.
|
774
|
+
|
775
|
+
## 2.14.7 - 2016-03-20
|
776
|
+
|
777
|
+
- Fixed bug where a comment before another JSON element caused an error. Comments are not part of the spec but this keep support consistent.
|
778
|
+
|
779
|
+
## 2.14.6 - 2016-02-26
|
780
|
+
|
781
|
+
- Changed JSON::ParserError to inherit from JSON::JSONError which inherits from StandardError.
|
782
|
+
|
783
|
+
## 2.14.5 - 2016-02-19
|
784
|
+
|
785
|
+
- Parse errors in mimic mode are not a separate class than Oj.ParseError so the displayed name is JSON::ParserError instead.
|
786
|
+
|
787
|
+
## 2.14.4 - 2016-02-04
|
788
|
+
|
789
|
+
- When not in quirks mode strings are now raise an exception if they are the top level JSON value.
|
790
|
+
|
791
|
+
## 2.14.3 - 2015-12-31
|
792
|
+
|
793
|
+
- Updated to support Ruby 2.3.0.
|
794
|
+
|
795
|
+
## 2.14.2 - 2015-12-19
|
796
|
+
|
797
|
+
- Non-UTF-8 string input is now converted to UTF-8.
|
798
|
+
|
799
|
+
## 2.14.1 - 2015-12-15
|
800
|
+
|
801
|
+
- Fixed bug that reverted to BigDecimal when a decimal had preceding zeros after the decimal point.
|
802
|
+
|
803
|
+
## 2.14.0 - 2015-12-04
|
804
|
+
|
805
|
+
- More tweaking on decimal rounding.
|
806
|
+
- Made dump options available in the default options and not only in the mimic generate calls.
|
807
|
+
|
808
|
+
## 2.13.1 - 2015-11-16
|
809
|
+
|
810
|
+
- Thanks to Comboy for the fix to a large number rounding bug.
|
811
|
+
|
812
|
+
## 2.13.0 - 2015-10-19
|
813
|
+
|
814
|
+
- Oj no longer raises an exception if the to_hash method of an object does not return a Hash. ActiveRecord has decided that to_hash should return an Array instead so Oj now encodes what ever is returned.
|
815
|
+
- Added a register_odd_raw function that allows odd marshal functions to return raw JSON as a string to be included in the dumped JSON.
|
816
|
+
- The register_odd function now supports modules in additions to classes.
|
817
|
+
|
818
|
+
## 2.12.14 - 2015-09-14
|
819
|
+
|
820
|
+
- Change the failure mode for objects that can not be serialized such as a socket. Now in compat mode the to_s of the object is placed in the output instead of raising an exception.
|
821
|
+
|
822
|
+
## 2.12.13 - 2015-09-02
|
823
|
+
|
824
|
+
- Added a check for the second argument to load() is a Hash.
|
825
|
+
- Yet another attempt to make floating point numbers display better.
|
826
|
+
- Thanks to mkillianey for getting the extconf.rb and gemspec file updated.
|
827
|
+
|
828
|
+
## 2.12.12 - 2015-08-09
|
829
|
+
|
830
|
+
- Thanks to asurin for adding support for arguments to to_json() that rails uses.
|
831
|
+
|
832
|
+
## 2.12.11 - 2015-08-02
|
833
|
+
|
834
|
+
- Oj::ParseError is now thrown instead of SyntaxError when there are multiple JSON documents in a string or file and there is no proc or block associated with the parse call.
|
835
|
+
|
836
|
+
## 2.12.10 - 2015-07-12
|
837
|
+
|
838
|
+
- An exception is now raised if there are multiple JSON documents in a string or file if there is no proc or block associated with the parse call.
|
839
|
+
|
840
|
+
## 2.12.9 - 2015-05-30
|
841
|
+
|
842
|
+
- Fixed failing test when using Rubinius.
|
843
|
+
- Changed mimic_JSON to support the global/kernel function JSON even when the json gem is loaded first.
|
844
|
+
|
845
|
+
## 2.12.8 - 2015-05-16
|
846
|
+
|
847
|
+
- mimic_JSON now supports the global/kernel JSON function that will either parse a string argument or dump an array or object argument.
|
848
|
+
|
849
|
+
## 2.12.7 - 2015-05-07
|
850
|
+
|
851
|
+
- Fixed compile error with 32 bit HAS_NANO_TIME extra paren bug.
|
852
|
+
|
853
|
+
## 2.12.6 - 2015-05-05
|
854
|
+
|
855
|
+
- Fixed a number of 32bit related bugs.
|
856
|
+
|
857
|
+
## 2.12.5 - 2015-04-27
|
858
|
+
|
859
|
+
- In :null mode Oj now dumps Infinity and NaN as null.
|
860
|
+
|
861
|
+
## 2.12.4 - 2015-04-20
|
862
|
+
|
863
|
+
- Fixed memory leak in Oj::Doc when not using a given proc.
|
864
|
+
|
865
|
+
## 2.12.3 - 2015-04-16
|
866
|
+
|
867
|
+
- Fixed bug when trying to resolve an invalid class path in object mode load.
|
868
|
+
|
869
|
+
## 2.12.2 - 2015-04-13
|
870
|
+
|
871
|
+
- Fixed Oj::Doc bug that causes a crash on local name lookups.
|
872
|
+
- Fixed Oj::Doc unicode parsing.
|
873
|
+
|
874
|
+
## 2.12.1 - 2015-03-12
|
875
|
+
|
876
|
+
- Changed the unix_zone encoded format to be the utc epoch.
|
877
|
+
|
878
|
+
## 2.12.0 - 2015-03-06
|
879
|
+
|
880
|
+
- String formats for UTC time are now explicitly UTC instead of offset of zero. This fixes a problem with pre-2.2.0 Rubies that automatically convert zero offset times to local times.
|
881
|
+
- Added :unix_zone time_format option for formatting numeric time. This option is the same as the :unix time option but the UTC offset is included as an exponent to the number time value. A value of 86400 is an indication of UTC time.
|
882
|
+
|
883
|
+
## 2.11.5 - 2015-02-25
|
884
|
+
|
885
|
+
- Fixed issue with rails as_json not being called for Structs.
|
886
|
+
- Added support for anonymous Structs with object mode encoding. Note that this will result in a new anonymous Struct for each instance.
|
887
|
+
|
888
|
+
## 2.11.4 - 2015-01-20
|
889
|
+
|
890
|
+
- DateTime second encoding is now always a Rational to preserve accuracy.
|
891
|
+
- Fixed buf in the Oj.load() callback feature that caused an endless loop when a StringIO was used with a JSON that was a number.
|
892
|
+
|
893
|
+
## 2.11.3 - 2015-01-18
|
894
|
+
|
895
|
+
- DateTime encoding now includes nanoseconds.
|
896
|
+
|
897
|
+
## 2.11.2 - 2015-01-10
|
898
|
+
|
899
|
+
- Changed the defaults for mimic_JSON to use 16 significant digits instead of the default 15.
|
900
|
+
- Fixed bug where a subclass of Array would be serialized as if in object mode instead of compat when in compat mode.
|
901
|
+
|
902
|
+
## 2.11.1 - 2014-11-09
|
903
|
+
|
904
|
+
- Changed the use_to_json option to still allow as_json even when set to false.
|
905
|
+
|
906
|
+
## 2.11.0 - 2014-11-02
|
907
|
+
|
908
|
+
- Restricted strict dump to not dump NaN nor Infinity but instead raise an exception.
|
909
|
+
- Changed compat mode so that the :bigdecimal_as_decimal option over-rides the to_json method if the option is true. The default for mimic_JSON is to leave the option off.
|
910
|
+
- Added support for Module encoding in compat mode.
|
911
|
+
- Added ActiveSupportHelper so that require 'active_support_helper' will added a helper for serializing ActiveSupport::TimeWithZone.
|
912
|
+
- Added float_precision option to control the number of digits used for floats when dumping.
|
913
|
+
|
914
|
+
## 2.10.4 - 2014-10-22
|
915
|
+
|
916
|
+
- Fixed Range encoding in compat mode to not use the object mode encoding.
|
917
|
+
- Fixed serialization problem with timestamps.
|
918
|
+
- Fixed compat parser to accept NaN and Infinity.
|
919
|
+
|
920
|
+
## 2.10.3 - 2014-10-04
|
921
|
+
|
922
|
+
- Using the xmlschema option with :object mode now saves time as a string and preserves the timezone.
|
923
|
+
- Rational recursive loop caused by active support fixed.
|
924
|
+
- Time in mimic_JSON mode are now the ruby string representation of a date.
|
925
|
+
|
926
|
+
## 2.10.2 - 2014-08-20
|
927
|
+
|
928
|
+
- Fixed string corruption bug due to an uncommented assignment used for debugging.
|
929
|
+
|
930
|
+
## 2.10.1 - 2014-08-17
|
931
|
+
|
932
|
+
- Changed parse argument error to be a Ruby ArgError instead of a general Exception.
|
933
|
+
|
934
|
+
## 2.10.0 - 2014-08-03
|
935
|
+
|
936
|
+
- Using an indent of less than zero will not place newline characters between JSON elements when using the string or stream writer.
|
937
|
+
- A new options callback method was added to the Simple Callback Parser. If defined the prepare_key() method will be called when an JSON object ket is first encountered. The return value is then used as the key in the key-value pair.
|
938
|
+
- Increased significants digits to 16 from 15. On occasion there may be unexpected round off results. Tou avoid those use the bigdecimal options.
|
939
|
+
|
940
|
+
## 2.9.9 - 2014-07-07
|
941
|
+
|
942
|
+
- Missed a character map entry. / in ascii mode is now output as / and not \/
|
943
|
+
- Fixed SC parser to not treat all IO that respond to fileno as a file. It not checks stat and asks if it is a file.
|
944
|
+
- Tightened object parsing of non-string hash keys so that just "^#x" is parsed as a hash pair and not "~#x".
|
945
|
+
- Using echo to STDIN as an IO input works around the exception raised when asking the IO for it's position (IO.pos).
|
946
|
+
- Simple Callback Parser now uses the new stream parser for handling files and IO so that larger files are handled more efficiently and streams are read as data arrives instead of on close.
|
947
|
+
- Handles file FIFO pipes correctly now.
|
948
|
+
|
949
|
+
## 2.9.8 - 2014-06-25
|
950
|
+
|
951
|
+
- Changed escaping back to previous release and added a new escape mode.
|
952
|
+
- Strict mode and compat mode no longer parse Infinity or NaN as a valid number. Both are valid in object mode still.
|
953
|
+
|
954
|
+
## 2.9.7 - 2014-06-24
|
955
|
+
|
956
|
+
- Changed dump to use raw / and raw \n in output instead of escaping.
|
957
|
+
- Changed the writer to always put a new line at the end of a top level JSON object. It makes output easier to view and edit with minimal impact on size.
|
958
|
+
- Worked around the file.gets look ahead caching as long as it is not called while parsing (of course).
|
959
|
+
- Thanks to lautis for a new parse option. quirks_mode allows Oj to behave quirky like the JSON gem. Actually the JSON gem has it backwards with quirky mode supporting the JSON spec and non-quirky limiting parsing to objects and arrays. Oj stays consistent with the JSON gem to avoid confusion.
|
960
|
+
- Fixed problem with sc_parse not terminating the string when loaded from a file.
|
961
|
+
- Thanks go to dchelimsky for expanding the code sample for the ScHandler.
|
962
|
+
|
963
|
+
## 2.9.6 - 2014-06-15
|
964
|
+
|
965
|
+
- Fixed bug using StringIO with SCParser.
|
966
|
+
- Tightened up JSON mimic to raise an exception if JSON.parse is called on a JSON documents that returns a primitive type.
|
967
|
+
|
968
|
+
## 2.9.5 - 2014-06-07
|
969
|
+
|
970
|
+
- Mimic mode now monkey patches Object like JSON.
|
971
|
+
- A big thanks to krasnoukhov for reorganizing test and helping get Oj more rails compatible.
|
972
|
+
- Another thanks goes out to lautis for a pull request that provided some optimization and fixed the return exception for an embedded null in a string.
|
973
|
+
- Fixed a bug with zip reader streams where EOF was not handled nicely.
|
974
|
+
|
975
|
+
## 2.9.4 - 2014-05-28
|
976
|
+
|
977
|
+
- In mimic mode parse errors now match the JSON::ParserError.
|
978
|
+
|
979
|
+
## 2.9.3 - 2014-05-15
|
980
|
+
|
981
|
+
- Fixed IO read error that showed up in IO objects that return nil instead of raising an EOF error when read is done.
|
982
|
+
|
983
|
+
## 2.9.2 - 2014-05-14
|
984
|
+
|
985
|
+
- Fixed link error with Windows.
|
986
|
+
|
987
|
+
## 2.9.1 - 2014-05-14
|
988
|
+
|
989
|
+
- Fixed mimic load when given a block to evalate. It conflicted with the new load option.
|
990
|
+
- Added a true stream that is used when the input argument to load is an IO object such as a stream or file. This is slightly slower for smaller files but allows reading of huge files that will not fit in memory and is more efficient on even larger files that would fit into memory. The load_file() method uses the new stream parser so multiple GB files can be processed without used execessive memory.
|
991
|
+
|
992
|
+
## 2.9.0 - 2014-05-01
|
993
|
+
|
994
|
+
- Added support for detection and handling of String, Array, and Hash subclasses.
|
995
|
+
- Oj.load() can now take a block which will be yielded to on every object parsed when used with a file or string with multiple JSON entries.
|
996
|
+
|
997
|
+
## 2.8.1 - 2014-04-21
|
998
|
+
|
999
|
+
- Added additional argument to the register_odd function.
|
1000
|
+
- Fixed bug that failed to load on some uses of STDIN.
|
1001
|
+
|
1002
|
+
## 2.8.0 - 2014-04-20
|
1003
|
+
|
1004
|
+
- Added support for registering special encoding and decoding rules for specific classes. This the ActiveSupport subclass of the String class for safe strings. For an example look at the `test_object.rb` file, `test_odd_string` test.
|
1005
|
+
|
1006
|
+
## 2.7.3 - 2014-04-11
|
1007
|
+
|
1008
|
+
- Fixed bug where load and dump of Structs in modules did not work correctly.
|
1009
|
+
|
1010
|
+
## 2.7.2 - 2014-04-06
|
1011
|
+
|
1012
|
+
- Added option return nil if nil is provided as input to load.
|
1013
|
+
|
1014
|
+
## 2.7.1 - 2014-03-30
|
1015
|
+
|
1016
|
+
- Fixed bug in new push_key which caused duplicate characters.
|
1017
|
+
|
1018
|
+
## 2.7.0 - 2014-03-29
|
1019
|
+
|
1020
|
+
- Added the push_key() method to the StringWriter and StreamWriter classes.
|
1021
|
+
|
1022
|
+
## 2.6.1 - 2014-03-21
|
1023
|
+
|
1024
|
+
- Set a limit on the maximum nesting depth to 1000. An exception is raised instead of a segfault unless a reduced stack is used which could trigger the segfault due to an out of memory condition.
|
1025
|
+
|
1026
|
+
## 2.6.0 - 2014-03-11
|
1027
|
+
|
1028
|
+
- Added the :use_to_json option for Oj.dump(). If this option is set to false the to_json() method on objects will not be called when dumping. This is the default behavior. The reason behind the option and change is to better support Rails and ActiveSupport. Previous works arounds have been removed.
|
1029
|
+
|
1030
|
+
## 2.5.5 - 2014-02-18
|
1031
|
+
|
1032
|
+
- Worked around the Rubinius failure to load bigdecimal from a require within the C code.
|
1033
|
+
|
1034
|
+
## 2.5.4 - 2014-01-14
|
1035
|
+
|
1036
|
+
- Fixed bug where unterminated JSON did not raise an exception.
|
1037
|
+
|
1038
|
+
## 2.5.3 - 2014-01-03
|
1039
|
+
|
1040
|
+
- Added support for blocks with StringWriter.
|
1041
|
+
|
1042
|
+
## 2.5.2 - 2014-01-02
|
1043
|
+
|
1044
|
+
- Fixed indent problem with StringWriter so it now indents properly.
|
1045
|
+
|
1046
|
+
## 2.5.1 - 2013-12-18
|
1047
|
+
|
1048
|
+
- Added push_json() to the StringWriter and StreamWriter to allow raw JSON to be added to a JSON document being constructed.
|
1049
|
+
|
1050
|
+
## 2.4.3 - 2013-12-16
|
1051
|
+
|
1052
|
+
- Made include pthread.h conditional for Windows.
|
1053
|
+
|
1054
|
+
## 2.4.2 - 2013-12-14
|
1055
|
+
|
1056
|
+
- Thanks to Patrik Rak for a fix to a buffer short copy when dumping with 0 indent.
|
1057
|
+
|
1058
|
+
## 2.4.1 - 2013-12-10
|
1059
|
+
|
1060
|
+
- Fixed Windows version by removing class cache test.
|
1061
|
+
|
1062
|
+
## 2.4.0 - 2013-12-08
|
1063
|
+
|
1064
|
+
- Merged in a PR to again allow strings with embedded nulls.
|
1065
|
+
- Implemented StreamWriter to compliment the StringWriter.
|
1066
|
+
- Fixed bug in the class cache hash function that showed up with the sparc compiler.
|
1067
|
+
|
1068
|
+
## 2.3.0 - 2013-12-01
|
1069
|
+
|
1070
|
+
- JRuby is no longer supported.
|
1071
|
+
- Thanks to Stefan Kaes the support for structs has been optimized.
|
1072
|
+
- Better support for Rubinous.
|
1073
|
+
- Added option to disable GG during parsing.
|
1074
|
+
- Added StringWriter that allows building a JSON document one element at a time.
|
1075
|
+
|
1076
|
+
## 2.2.3 - 2013-11-19
|
1077
|
+
|
1078
|
+
- Fixed struct segfault on load.
|
1079
|
+
- Added option to force float on load if a decimal number.
|
1080
|
+
|
1081
|
+
## 2.2.2 - 2013-11-17
|
1082
|
+
|
1083
|
+
- Added mutex support for Windows.
|
1084
|
+
- Protected SCP parser for GC.
|
1085
|
+
|
1086
|
+
## 2.2.1 - 2013-11-15
|
1087
|
+
|
1088
|
+
- Made all VALUEs in parse volatile to avoid garbage collection while in use.
|
1089
|
+
|
1090
|
+
## 2.2.0 - 2013-11-11
|
1091
|
+
|
1092
|
+
- All 1.8.x versions of Ruby now have require 'rational' called.
|
1093
|
+
- Removed the temporary GC disable and implemented mark strategy instead.
|
1094
|
+
- Added new character encoding mode to support the Rails 4 escape characters of &, as xss_safe mode. The :encoding option replaces the :ascii_only option.
|
1095
|
+
- Change parsing of NaN to not use math.h which on older systems does not define NAN.
|
1096
|
+
|
1097
|
+
## 2.1.8 - 2013-10-28
|
1098
|
+
|
1099
|
+
- All 1.8.x versions of Ruby now have require 'rational' called.
|
1100
|
+
- Removed the temporary GC disable and implemented mark strategy instead.
|
1101
|
+
|
1102
|
+
## 2.1.7 - 2013-10-19
|
1103
|
+
|
1104
|
+
- Added support for NaN and -NaN to address issue #102. This is not according to the JSON spec but seems to be expected.
|
1105
|
+
- Added require for rational if the Ruby version is 1.8.7 to address issue #104.
|
1106
|
+
- Added Rails re-call of Oj.dump in the to_json() method which caused loops with Rational objects to fix issue #108 and #105.
|
1107
|
+
|
1108
|
+
## 2.1.6 - 2013-10-07
|
1109
|
+
|
1110
|
+
- Added Oj.to_stream() for dumping JSON to an IO object.
|
1111
|
+
|
1112
|
+
## 2.1.5 - 2013-07-21
|
1113
|
+
|
1114
|
+
- Allow exception dumping magic with Windows.
|
1115
|
+
|
1116
|
+
## 2.1.4 - 2013-07-04
|
1117
|
+
|
1118
|
+
- Fixed Linux 32 bit rounding bug.
|
1119
|
+
|
1120
|
+
## 2.1.3 - 2013-06-30
|
1121
|
+
|
1122
|
+
- Fixed bug that did not deserialize all attributes in an Exception subclass.
|
1123
|
+
- Added a sample to demonstrate how to write Exception subclasses that will automatically serialize and deserialize.
|
1124
|
+
|
1125
|
+
## 2.1.2 - 2013-06-19
|
1126
|
+
|
1127
|
+
- Fixed support for Windows.
|
1128
|
+
|
1129
|
+
## 2.1.1 - 2013-06-17
|
1130
|
+
|
1131
|
+
- Fixed off by 1 error in buffer for escaped strings.
|
1132
|
+
|
1133
|
+
## 2.1.0 - 2013-06-16
|
1134
|
+
|
1135
|
+
- This version is a major rewrite of the parser. The parser now uses a constant stack size no matter how deeply nested the JSON document is. The parser is also slightly faster for larger documents and 30% faster for object parsing.
|
1136
|
+
- Oj.strict_load() was renamed to Oj.safe_load() to better represent its functionality. A new Oj.strict_load() is simply Oj.load() with :mode set to :strict.
|
1137
|
+
- Oj.compat_load() and Oj.object_load() added.
|
1138
|
+
- A new Simple Callback Parser was added invoked by Oj.sc_parse().
|
1139
|
+
- Eliminated :max_stack option as it is no longer needed.
|
1140
|
+
- Handle cleanup after exceptions better.
|
1141
|
+
|
1142
|
+
## 2.0.14 - 2013-05-26
|
1143
|
+
|
1144
|
+
- Fixed bug in Oj::Doc.each_leaf that caused an incorrect where path to be created and also added a check for where path maximum length.
|
1145
|
+
- Updated the documentation to note that invalid JSON documents, which includes an empty string or file, will cause an exception to be raised.
|
1146
|
+
|
1147
|
+
## 2.0.13 - 2013-05-17
|
1148
|
+
|
1149
|
+
- Changed dump to put closing array brackets and closing object curlies on the line following the last element if :indent is set to greater than zero.
|
1150
|
+
|
1151
|
+
## 2.0.12 - 2013-04-28
|
1152
|
+
|
1153
|
+
- Another fix for mimic.
|
1154
|
+
- mimic_JSON now can now be called after loading the json gem. This will replace the json gem methods after loading. This may be more compatible in many cases.
|
1155
|
+
|
1156
|
+
## 2.0.11 - 2013-04-23
|
1157
|
+
|
1158
|
+
- Fixed mimic issue with Debian
|
1159
|
+
- Added option to not cache classes when loading. This should be used when classes are dynamically unloaded and the redefined.
|
1160
|
+
- Float rounding improved by limiting decimal places to 15 places.
|
1161
|
+
- Fixed xml time dumping test.
|
1162
|
+
|
1163
|
+
## 2.0.10 - 2013-03-10
|
1164
|
+
|
1165
|
+
- Tweaked dump calls by reducing preallocation. Speeds are now several times faster for smaller objects.
|
1166
|
+
- Fixed Windows compile error with Ruby 2.0.0.
|
1167
|
+
|
1168
|
+
## 2.0.9 - 2013-03-04
|
1169
|
+
|
1170
|
+
- Fixed problem with INFINITY with CentOS and Ruby 2.0.0. There are some header file conflicts so a different INFINITY was used.
|
1171
|
+
|
1172
|
+
## 2.0.8 - 2013-03-01
|
1173
|
+
|
1174
|
+
- Added :bigdecimal_load option that forces all decimals in a JSON string to be read as BigDecimals instead of as Floats. This is useful if precision is important.
|
1175
|
+
- Worked around bug in active_support 2.3.x where BigDecimal.as_json() returned self instead of a JSON primitive. Of course that creates a loop and blows the stack. Oj ignores the as_json() for any object that returns itself and instead encodes the object as it sees fit which is usually what is expected.
|
1176
|
+
- All tests pass with Ruby 2.0.0-p0. Had to modify Exception encoding slightly.
|
1177
|
+
|
1178
|
+
## 2.0.7 - 2013-02-18
|
1179
|
+
|
1180
|
+
- Fixed bug where undefined classes specified in a JSON document would freeze Ruby instead of raising an exception when the auto_define option was not set. (It seems that Ruby freezes on trying to add variables to nil.)
|
1181
|
+
|
1182
|
+
## 2.0.6 - 2013-02-18
|
1183
|
+
|
1184
|
+
- Worked around an undocumented feature in linux when using make that misreports the stack limits.
|
1185
|
+
|
1186
|
+
## 2.0.5 - 2013-02-16
|
1187
|
+
|
1188
|
+
- DateTimes are now output the same in compat mode for both 1.8.7 and 1.9.3 even though they are implemented differently in each Ruby.
|
1189
|
+
- Objects implemented as data structs can now change the encoding by implemented either to_json(), as_json(), or to_hash().
|
1190
|
+
- Added an option to allow BigDecimals to be dumped as either a string or as a number. There was no agreement on which was the best or correct so both are possible with the correct option setting.
|
1191
|
+
|
1192
|
+
## 2.0.4 - 2013-02-11
|
1193
|
+
|
1194
|
+
- Fixed bug related to long class names.
|
1195
|
+
- Change the default for the auto_define option.
|
1196
|
+
- Added Oj.strict_load() method that sets the options to public safe options. This should be safe for loading JSON documents from a public unverified source. It does not eleviate to need for reasonable programming practices of course. See the section on the proper use of Oj in a public exposure.
|
1197
|
+
|
1198
|
+
## 2.0.3 - 2013-02-03
|
1199
|
+
|
1200
|
+
- Fixed round off error in time format when rounding up to the next second.
|
1201
|
+
|
1202
|
+
## 2.0.2 - 2013-01-23
|
1203
|
+
|
1204
|
+
- Fixed bug in Oj.load where loading a hash with symbold keys and also turning on symbolize keys would try to symbolize a symbol.
|
1205
|
+
|
1206
|
+
## 2.0.1 - 2013-01-15
|
1207
|
+
|
1208
|
+
- BigDecimals now dump to a string in compat mode thanks to cgriego.
|
1209
|
+
- High precision time (nano time) can be turned off for better compatibility with other JSON parsers.
|
1210
|
+
- Times before 1970 now encode correctly.
|
1211
|
+
|
1212
|
+
## 2.0.0 - 2012-12-18
|
1213
|
+
|
1214
|
+
- Thanks to yuki24 Floats are now output with a decimal even if they are an integer value.
|
1215
|
+
- The Simple API for JSON (SAJ) API has been added. Read more about it on the Oj::Saj page.
|
1216
|
+
|
1217
|
+
## 1.4.7 - 2012-12-09
|
1218
|
+
|
1219
|
+
- In compat mode non-String keys are converted to Strings instead of raising and error. (issue #52)
|
1220
|
+
|
1221
|
+
## 1.4.6 - 2012-12-03
|
1222
|
+
|
1223
|
+
- Silently ignores BOM on files and Strings.
|
1224
|
+
- Now works with JRuby 1.7.0 to the extent possible with the unsupported C extension in JRuby.
|
1225
|
+
|
1226
|
+
## 1.4.5 - 2012-11-19
|
1227
|
+
|
1228
|
+
- Adds the old deprecated methods of unparse(), fast_unparse(), and pretty_unparse() to JSON_mimic.
|
1229
|
+
|
1230
|
+
## 1.4.4 - 2012-11-07
|
1231
|
+
|
1232
|
+
- Fixed bug in mimic that missed mimicking json_pure.
|
1233
|
+
|
1234
|
+
## 1.4.3 - 2012-10-19
|
1235
|
+
|
1236
|
+
- Fixed Exception encoding in Windows version.
|
1237
|
+
|
1238
|
+
## 1.4.2 - 2012-10-17
|
1239
|
+
|
1240
|
+
- Fixed dump and load of BigDecimals in :object mode.
|
1241
|
+
- BigDecimals are now dumped and loaded in all modes.
|
1242
|
+
|
1243
|
+
## 1.4.1 - 2012-10-17
|
1244
|
+
|
1245
|
+
- Windows RubyInstaller and TCS-Ruby now supported thanks to Jarmo Pertman. Thanks Jarmo.
|
1246
|
+
|
1247
|
+
## 1.4.0 - 2012-10-11
|
1248
|
+
|
1249
|
+
- Parse errors now raise an Exception that inherites form Oj::Error which inherits from StandardError. Some other Exceptions were changed as well to make it easier to rescue errors.
|
1250
|
+
|
1251
|
+
## 1.3.7 - 2012-10-05
|
1252
|
+
|
1253
|
+
- Added header file for linux builds.
|
1254
|
+
|
1255
|
+
## 1.3.6 - 2012-10-04
|
1256
|
+
|
1257
|
+
- Oj.load() now raises a SystemStackError if a JSON is too deeply nested. The loading is allowed to use on 75% of the stack.
|
1258
|
+
- Oj::Doc.open() now raises a SystemStackError if a JSON is too deeply nested. The loading is allowed to use on 75% of the stack. Oj::Doc.open will allow much deeper nesting than Oj.load().
|
1259
|
+
|
1260
|
+
## 1.3.5 - 2012-09-25
|
1261
|
+
|
1262
|
+
- Fixed mimic_JSON so it convinces Ruby that the ALL versions of the json gem are already loaded.
|
1263
|
+
|
1264
|
+
## 1.3.4 - 2012-08-12
|
1265
|
+
|
1266
|
+
- Fixed mimic_JSON so it convinces Ruby that the json gem is already loaded.
|
1267
|
+
|
1268
|
+
## 1.3.2 - 2012-07-28
|
1269
|
+
|
1270
|
+
- Fixed compile problems with native Ruby on OS X 10.8 (Mountain Lion)
|
1271
|
+
|
1272
|
+
## 1.3.1 - 2012-07-01
|
1273
|
+
|
1274
|
+
- Fixed time zone issue with :xmlschema date format.
|
1275
|
+
|
1276
|
+
## 1.3.0 - 2012-07-09
|
1277
|
+
|
1278
|
+
- extconf.rb fixed to not pause on some OSs when checking CentOS special case.
|
1279
|
+
- Added an option to control the time format output when in :compat mode.
|
1280
|
+
|
1281
|
+
## 1.2.13 - 2012-07-08
|
1282
|
+
|
1283
|
+
- Fixed double free bug in Oj::Doc that showed up for larger documents.
|
1284
|
+
|
1285
|
+
## 1.2.12 - 2012-07-06
|
1286
|
+
|
1287
|
+
- Fixed GC bug in Oj::Doc, the fast parser.
|
1288
|
+
- Serialization of Exceptions in Ruby 1.8.7 now includes message and backtrace.
|
1289
|
+
|
1290
|
+
## 1.2.11 - 2012-06-21
|
1291
|
+
|
1292
|
+
- Added :max_stack option to limit the size of string allocated on the stack.
|
1293
|
+
|
1294
|
+
## 1.2.10 - 2012-06-20
|
1295
|
+
|
1296
|
+
- Added check for circular on loading of circular dumped JSON.
|
1297
|
+
- Added support for direct serialization of BigDecimal, Rational, Date, and DateTime.
|
1298
|
+
- Added json.rb to $" in mimic mode to avoid pulling in the real JSON by accident.
|
1299
|
+
- Oj is now thread safe for all functions.
|
1300
|
+
- The / (solidus) character is now placed in strings without being escaped.
|
1301
|
+
|
1302
|
+
## 1.2.9 - 2012-05-29
|
1303
|
+
|
1304
|
+
|
1305
|
+
## 1.2.8 - 2012-05-03
|
1306
|
+
|
1307
|
+
- Included a contribution by nevans to fix a math.h issue with an old fedora linux machine.
|
1308
|
+
- Included a fix to the documentation found by mat.
|
1309
|
+
|
1310
|
+
## 1.2.7 - 2012-04-22
|
1311
|
+
|
1312
|
+
- Fixed bug where a float with too many characters would generate an error. It is not parsed as accuractly as Ruby will support.
|
1313
|
+
- Cleaned up documentation errors.
|
1314
|
+
- Added support for OS X Ruby 1.8.7.
|
1315
|
+
|
1316
|
+
## 1.2.6 - 2012-04-22
|
1317
|
+
|
1318
|
+
- Cleaned up documentation errors.
|
1319
|
+
- Added support for OS X Ruby 1.8.7.
|
1320
|
+
|
1321
|
+
## 1.2.5 - 2012-04-18
|
1322
|
+
|
1323
|
+
- Added support for create_id in Oj and in mimic_JSON mode
|
1324
|
+
|
1325
|
+
## 1.2.4 - 2012-04-13
|
1326
|
+
|
1327
|
+
- Removed all use of math.h to get around CentOS 5.4 compile problem.
|
1328
|
+
|
1329
|
+
## 1.2.3 - 2012-04-09
|
1330
|
+
|
1331
|
+
- Fixed compile error for the latest RBX on Travis.
|
1332
|
+
|
1333
|
+
## 1.2.2 - 2012-04-02
|
1334
|
+
|
1335
|
+
- minor bug fixes for different rubies along with test updates
|
1336
|
+
- Oj::Doc will now automatically close on GC.
|
1337
|
+
|
1338
|
+
## 1.2.1 - 2012-03-30
|
1339
|
+
|
1340
|
+
- Organized compile configuration better.
|
1341
|
+
- as_json() support now more flexible thanks to a contribution by sauliusg.
|
1342
|
+
|
1343
|
+
## 1.2.0 - 2012-03-30
|
1344
|
+
|
1345
|
+
- Removed the encoding option and fixed a misunderstanding of the string encoding. Unicode code points are now used instead of byte codes. This is not compatible with previous releases but is compliant with RFC4627.
|
1346
|
+
- Time encoding in :object mode is faster and higher nanosecond precision.
|
1347
|
+
|
1348
|
+
## 1.1.1 - 2012-03-27
|
1349
|
+
|
1350
|
+
- The encoding option can now be an Encoding Object or a String.
|
1351
|
+
- Fixed Rubinius errors.
|
1352
|
+
|
1353
|
+
## 1.1.0 - 2012-03-27
|
1354
|
+
|
1355
|
+
- Errors are not longer raised when comments are encountered in JSON documents.
|
1356
|
+
- Oj can now mimic JSON. With some exceptions calling JSON.mimic_JSON will allow all JSON calls to use OJ instead of JSON. This gives a speedup of more than 2x on parsing and 5x for generating over the JSON::Ext module.
|
1357
|
+
- Oj::Doc now allows a document to be left open and then closed with the Oj::Doc.close() class.
|
1358
|
+
- Changed the default encoding to UTF-8 instead of the Ruby default String encoding.
|
1359
|
+
|
1360
|
+
## 1.0.6 - 2012-03-20
|
1361
|
+
|
1362
|
+
- Gave Oj::Doc a speed increase. It is now 8 times fast than JSON::Ext.
|
1363
|
+
|
1364
|
+
## 1.0.5 - 2012-03-17
|
1365
|
+
|
1366
|
+
- Added :ascii_only options for dumping JSON where all high-bit characters are encoded as escaped sequences.
|
1367
|
+
|
1368
|
+
## 1.0.4 - 2012-03-16
|
1369
|
+
|
1370
|
+
- Fixed bug that did not allow symbols as keys in :compat mode.
|
1371
|
+
|
1372
|
+
## 1.0.3 - 2012-03-15
|
1373
|
+
|
1374
|
+
- Added :symbol_keys option to convert String hash keys into Symbols.
|
1375
|
+
- The load() method now supports IO Objects as input as well as Strings.
|
1376
|
+
|
1377
|
+
## 1.0.2 - 2012-03-15
|
1378
|
+
|
1379
|
+
- Added RSTRING_NOT_MODIFIED for Rubinius optimization.
|
1380
|
+
|
1381
|
+
## 1.0.1 - 2012-03-15
|
1382
|
+
|
1383
|
+
- Fixed compatibility problems with Ruby 1.8.7.
|
1384
|
+
|
1385
|
+
## 1.0.0 - 2012-03-13
|
1386
|
+
|
1387
|
+
- The screaming fast Oj::Doc parser added.
|
1388
|
+
|
1389
|
+
## 0.9.0 - 2012-03-05
|
1390
|
+
|
1391
|
+
- Added support for circular references.
|
1392
|
+
|
1393
|
+
## 0.8.0 - 2012-02-27
|
1394
|
+
|
1395
|
+
- Auto creation of data classes when unmarshalling Objects if the Class is not defined
|
1396
|
+
|
1397
|
+
## 0.7.0 - 2012-02-26
|
1398
|
+
|
1399
|
+
- changed the object JSON format
|
1400
|
+
- serialized Ruby Objects can now be deserialized
|
1401
|
+
- improved performance testing
|
1402
|
+
|
1403
|
+
## 0.6.0 - 2012-02-22
|
1404
|
+
|
1405
|
+
- supports arbitrary Object dumping/serialization
|
1406
|
+
- to_hash() method called if the Object responds to to_hash and the result is converted to JSON
|
1407
|
+
- to_json() method called if the Object responds to to_json
|
1408
|
+
- almost any Object can be dumped, including Exceptions (not including Thread, Mutex and Objects that only make sense within a process)
|
1409
|
+
- default options have been added
|
1410
|
+
|
1411
|
+
## 0.5.2 - 2012-02-19
|
1412
|
+
|
1413
|
+
- Release 0.5.2 fixes encoding and float encoding.
|
1414
|
+
- This is the first release sith a version of 0.5 indicating it is only half done. Basic load() and dump() is supported for Hash, Array, NilClass, TrueClass, FalseClass, Fixnum, Float, Symbol, and String Objects.
|
1415
|
+
|
1416
|
+
## 0.5.1 - 2012-02-19
|
1417
|
+
|
1418
|
+
|
1419
|
+
## 0.5 - 2012-02-19
|
1420
|
+
|
1421
|
+
- This is the first release with a version of 0.5 indicating it is only half done. Basic load() and dump() is supported for Hash, Array, NilClass, TrueClass, FalseClass, Fixnum, Float, Symbol, and String Objects.
|