json_pure 1.4.6 → 2.8.1

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.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/BSDL +22 -0
  3. data/CHANGES.md +544 -0
  4. data/COPYING +14 -16
  5. data/LEGAL +60 -0
  6. data/README.md +219 -0
  7. data/json_pure.gemspec +39 -0
  8. data/lib/json/pure.rb +3 -76
  9. metadata +45 -165
  10. data/CHANGES +0 -179
  11. data/GPL +0 -340
  12. data/README +0 -356
  13. data/Rakefile +0 -292
  14. data/TODO +0 -1
  15. data/VERSION +0 -1
  16. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +0 -52
  17. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +0 -1000
  18. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +0 -1001
  19. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +0 -900
  20. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +0 -901
  21. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +0 -1000
  22. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +0 -1001
  23. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +0 -261
  24. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +0 -1000
  25. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +0 -1001
  26. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +0 -1000
  27. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +0 -1001
  28. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +0 -1000
  29. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +0 -1001
  30. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +0 -262
  31. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +0 -1000
  32. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +0 -1001
  33. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +0 -82
  34. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +0 -34
  35. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +0 -900
  36. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +0 -901
  37. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +0 -81
  38. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +0 -1000
  39. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +0 -1001
  40. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +0 -82
  41. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +0 -1000
  42. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +0 -1001
  43. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +0 -82
  44. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +0 -1000
  45. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +0 -1001
  46. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +0 -82
  47. data/benchmarks/generator2_benchmark.rb +0 -222
  48. data/benchmarks/generator_benchmark.rb +0 -224
  49. data/benchmarks/ohai.json +0 -1216
  50. data/benchmarks/ohai.ruby +0 -1
  51. data/benchmarks/parser2_benchmark.rb +0 -251
  52. data/benchmarks/parser_benchmark.rb +0 -259
  53. data/bin/edit_json.rb +0 -9
  54. data/bin/prettify_json.rb +0 -75
  55. data/data/example.json +0 -1
  56. data/data/index.html +0 -38
  57. data/data/prototype.js +0 -4184
  58. data/ext/json/ext/generator/extconf.rb +0 -20
  59. data/ext/json/ext/generator/generator.c +0 -1417
  60. data/ext/json/ext/generator/generator.h +0 -197
  61. data/ext/json/ext/parser/extconf.rb +0 -15
  62. data/ext/json/ext/parser/parser.c +0 -1935
  63. data/ext/json/ext/parser/parser.h +0 -71
  64. data/ext/json/ext/parser/parser.rl +0 -792
  65. data/install.rb +0 -26
  66. data/lib/json/Array.xpm +0 -21
  67. data/lib/json/FalseClass.xpm +0 -21
  68. data/lib/json/Hash.xpm +0 -21
  69. data/lib/json/Key.xpm +0 -73
  70. data/lib/json/NilClass.xpm +0 -21
  71. data/lib/json/Numeric.xpm +0 -28
  72. data/lib/json/String.xpm +0 -96
  73. data/lib/json/TrueClass.xpm +0 -21
  74. data/lib/json/add/core.rb +0 -148
  75. data/lib/json/add/rails.rb +0 -58
  76. data/lib/json/common.rb +0 -391
  77. data/lib/json/editor.rb +0 -1371
  78. data/lib/json/ext.rb +0 -15
  79. data/lib/json/json.xpm +0 -1499
  80. data/lib/json/pure/generator.rb +0 -439
  81. data/lib/json/pure/parser.rb +0 -309
  82. data/lib/json/version.rb +0 -8
  83. data/lib/json.rb +0 -10
  84. data/tests/fixtures/fail1.json +0 -1
  85. data/tests/fixtures/fail10.json +0 -1
  86. data/tests/fixtures/fail11.json +0 -1
  87. data/tests/fixtures/fail12.json +0 -1
  88. data/tests/fixtures/fail13.json +0 -1
  89. data/tests/fixtures/fail14.json +0 -1
  90. data/tests/fixtures/fail18.json +0 -1
  91. data/tests/fixtures/fail19.json +0 -1
  92. data/tests/fixtures/fail2.json +0 -1
  93. data/tests/fixtures/fail20.json +0 -1
  94. data/tests/fixtures/fail21.json +0 -1
  95. data/tests/fixtures/fail22.json +0 -1
  96. data/tests/fixtures/fail23.json +0 -1
  97. data/tests/fixtures/fail24.json +0 -1
  98. data/tests/fixtures/fail25.json +0 -1
  99. data/tests/fixtures/fail27.json +0 -2
  100. data/tests/fixtures/fail28.json +0 -2
  101. data/tests/fixtures/fail3.json +0 -1
  102. data/tests/fixtures/fail4.json +0 -1
  103. data/tests/fixtures/fail5.json +0 -1
  104. data/tests/fixtures/fail6.json +0 -1
  105. data/tests/fixtures/fail7.json +0 -1
  106. data/tests/fixtures/fail8.json +0 -1
  107. data/tests/fixtures/fail9.json +0 -1
  108. data/tests/fixtures/pass1.json +0 -56
  109. data/tests/fixtures/pass15.json +0 -1
  110. data/tests/fixtures/pass16.json +0 -1
  111. data/tests/fixtures/pass17.json +0 -1
  112. data/tests/fixtures/pass2.json +0 -1
  113. data/tests/fixtures/pass26.json +0 -1
  114. data/tests/fixtures/pass3.json +0 -6
  115. data/tests/test_json.rb +0 -394
  116. data/tests/test_json_addition.rb +0 -162
  117. data/tests/test_json_encoding.rb +0 -68
  118. data/tests/test_json_fixtures.rb +0 -34
  119. data/tests/test_json_generate.rb +0 -181
  120. data/tests/test_json_rails.rb +0 -144
  121. data/tests/test_json_unicode.rb +0 -76
  122. data/tools/fuzz.rb +0 -139
  123. data/tools/server.rb +0 -61
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f15ef81b6948a3ad8be4077975b9301dc8efde70ec0d8c2d834693f28bc7ab71
4
+ data.tar.gz: 41519748aa9a0f745355bf17a1c9729b68a73853c0367b9c0be3f2b88ec1b2c2
5
+ SHA512:
6
+ metadata.gz: 1e67f4395d33a86c8f894340f378aad30ac19d4922a6b341ff8fb2f9e24b74628243d81f710e7218819c03578b031ecc6bb1f2c9ceb76b2237809a97113e3299
7
+ data.tar.gz: 9dd6a6cd837441aa7314f959c0b0ef96cf3c853f1934a1da391fb3a20752340febbc9bb4c1dca5043c788b53ca791865529783e42bf3ebeb38ca0b0d811a88dc
data/BSDL ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+ 1. Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ 2. Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22
+ SUCH DAMAGE.
data/CHANGES.md ADDED
@@ -0,0 +1,544 @@
1
+ # Changes
2
+
3
+ ### UNRELEASED
4
+
5
+ * Emit a deprecation warning when `JSON.load` create custom types without the `create_additions` option being explictly enabled.
6
+ * Prefer to use `JSON.unsafe_load(string)` or `JSON.load(string, create_additions: true)`.
7
+ * Emit a deprecation warning when serializing valid UTF-8 strings encoded in `ASCII_8BIT` aka `BINARY`.
8
+ * Bump required_ruby_version to 2.7.
9
+ * More performance improvments to `JSON.dump` and `JSON.generate`.
10
+
11
+ ### 2024-10-25 (2.7.5)
12
+
13
+ * Fix a memory leak when `#to_json` methods raise an exception.
14
+ * Gracefully handle formatting configs being set to `nil` instead of `""`.
15
+ * Workaround another issue caused by conflicting versions of both `json_pure` and `json` being loaded.
16
+
17
+ ### 2024-10-25 (2.7.4)
18
+
19
+ * Workaround a bug in 3.4.8 and older https://github.com/rubygems/rubygems/pull/6490.
20
+ This bug would cause some gems with native extension to fail during compilation.
21
+ * Workaround different versions of `json` and `json_pure` being loaded (not officially supported).
22
+ * Make `json_pure` Ractor compatible.
23
+
24
+ ### 2024-10-24 (2.7.3)
25
+
26
+ * Numerous performance optimizations in `JSON.generate` and `JSON.dump` (up to 2 times faster).
27
+ * Limit the size of ParserError exception messages, only include up to 32 bytes of the unparseable source.
28
+ * Fix json-pure's `Object#to_json` to accept non state arguments
29
+ * Fix multiline comment support in `json-pure`.
30
+ * Fix `JSON.parse` to no longer mutate the argument encoding when passed an ASCII-8BIT string.
31
+ * Fix `String#to_json` to raise on invalid encoding in `json-pure`.
32
+ * Delete code that was based on CVTUTF.
33
+ * Use the pure-Ruby generator on TruffleRuby.
34
+ * Fix `strict` mode in `json-pure` to not break on Integer.
35
+
36
+ ### 2024-04-04 (2.7.2)
37
+
38
+ * Use rb_sym2str instead of SYM2ID #561
39
+ * Fix memory leak when exception is raised during JSON generation #574
40
+ * Remove references to "19" methods in JRuby #576
41
+ * Make OpenStruct support as optional by @hsbt in #565
42
+ * Autoload JSON::GenericObject to avoid require ostruct warning in Ruby 3.4 #577
43
+ * Warn to install ostruct if json couldn't load it by @hsbt #578
44
+
45
+ ### 2023-12-05 (2.7.1)
46
+
47
+ * JSON.dump: handle unenclosed hashes regression #554
48
+ * Overload kwargs in JSON.dump #556
49
+ * [DOC] RDoc for additions #557
50
+ * Fix JSON.dump overload combination #558
51
+
52
+ ### 2023-12-01 (2.7.0)
53
+
54
+ * Add a strict option to Generator #519
55
+ * `escape_slash` option was renamed as `script_safe` and now also escape U+2028 and U+2029. `escape_slash` is now an alias of `script_safe` #525
56
+ * Remove unnecessary initialization of create_id in JSON.parse() #454
57
+ * Improvements to Hash#to_json in pure implementation generator #203
58
+ * Use ruby_xfree to free buffers #518
59
+ * Fix "unexpected token" offset for Infinity #507
60
+ * Avoid using deprecated BigDecimal.new on JRuby #546
61
+ * Removed code for Ruby 1.8 #540
62
+ * Rename JSON::ParseError to JSON:ParserError #530
63
+ * Call super in included hook #486
64
+ * JRuby requires a minimum of Java 8 #516
65
+ * Always indent even if empty #517
66
+
67
+ ### 2022-11-30 (2.6.3)
68
+
69
+ * bugfix json/pure mixing escaped with literal unicode raises Encoding::CompatibilityError #483
70
+ * Stop including the parser source __LINE__ in exceptions #470
71
+
72
+ ### 2022-11-17 (2.6.2)
73
+
74
+ * Remove unknown keyword arg from DateTime.parse #488
75
+ * Ignore java artifacts by @hsbt #489
76
+ * Fix parser bug for empty string allocation #496
77
+
78
+ ### 2021-10-24 (2.6.1)
79
+
80
+ * Restore version.rb with 2.6.1
81
+
82
+ ### 2021-10-14 (2.6.0)
83
+
84
+ * Use `rb_enc_interned_str` if available to reduce allocations in `freeze: true` mode. #451.
85
+ * Bump required_ruby_version to 2.3.
86
+ * Fix compatibility with `GC.compact`.
87
+ * Fix some compilation warnings. #469
88
+
89
+ ## 2020-12-22 (2.5.1)
90
+
91
+ * Restore the compatibility for constants of JSON class.
92
+
93
+ ## 2020-12-22 (2.5.0)
94
+
95
+ * Ready to Ractor-safe at Ruby 3.0.
96
+
97
+ ## 2020-12-17 (2.4.1)
98
+
99
+ * Restore version.rb with 2.4.1
100
+
101
+ ## 2020-12-15 (2.4.0)
102
+
103
+ * Implement a freeze: parser option #447
104
+ * Fix an issue with generate_pretty and empty objects in the Ruby and Java implementations #449
105
+ * Fix JSON.load_file doc #448
106
+ * Fix pure parser with unclosed arrays / objects #425
107
+ * bundle the LICENSE file in the gem #444
108
+ * Add an option to escape forward slash character #405
109
+ * RDoc for JSON #439 #446 #442 #434 #433 #430
110
+
111
+ ## 2020-06-30 (2.3.1)
112
+
113
+ * Spelling and grammar fixes for comments. Pull request #191 by Josh
114
+ Kline.
115
+ * Enhance generic JSON and #generate docs. Pull request #347 by Victor
116
+ Shepelev.
117
+ * Add :nodoc: for GeneratorMethods. Pull request #349 by Victor Shepelev.
118
+ * Baseline changes to help (JRuby) development. Pull request #371 by Karol
119
+ Bucek.
120
+ * Add metadata for rubygems.org. Pull request #379 by Alexandre ZANNI.
121
+ * Remove invalid JSON.generate description from JSON module rdoc. Pull
122
+ request #384 by Jeremy Evans.
123
+ * Test with TruffleRuby in CI. Pull request #402 by Benoit Daloze.
124
+ * Rdoc enhancements. Pull request #413 by Burdette Lamar.
125
+ * Fixtures/ are not being tested... Pull request #416 by Marc-André
126
+ Lafortune.
127
+ * Use frozen string for hash key. Pull request #420 by Marc-André
128
+ Lafortune.
129
+ * Added :call-seq: to RDoc for some methods. Pull request #422 by Burdette
130
+ Lamar.
131
+ * Small typo fix. Pull request #423 by Marc-André Lafortune.
132
+
133
+ ## 2019-12-11 (2.3.0)
134
+ * Fix default of `create_additions` to always be `false` for `JSON(user_input)`
135
+ and `JSON.parse(user_input, nil)`.
136
+ Note that `JSON.load` remains with default `true` and is meant for internal
137
+ serialization of trusted data. [CVE-2020-10663]
138
+ * Fix passing args all #to_json in json/add/*.
139
+ * Fix encoding issues
140
+ * Fix issues of keyword vs positional parameter
141
+ * Fix JSON::Parser against bigdecimal updates
142
+ * Bug fixes to JRuby port
143
+
144
+ ## 2019-02-21 (2.2.0)
145
+ * Adds support for 2.6 BigDecimal and ruby standard library Set datetype.
146
+
147
+ ## 2017-04-18 (2.1.0)
148
+ * Allow passing of `decimal_class` option to specify a class as which to parse
149
+ JSON float numbers.
150
+ ## 2017-03-23 (2.0.4)
151
+ * Raise exception for incomplete unicode surrogates/character escape
152
+ sequences. This problem was reported by Daniel Gollahon (dgollahon).
153
+ * Fix arbitrary heap exposure problem. This problem was reported by Ahmad
154
+ Sherif (ahmadsherif).
155
+
156
+ ## 2017-01-12 (2.0.3)
157
+ * Set `required_ruby_version` to 1.9
158
+ * Some small fixes
159
+
160
+ ## 2016-07-26 (2.0.2)
161
+ * Specify `required_ruby_version` for json\_pure.
162
+ * Fix issue #295 failure when parsing frozen strings.
163
+
164
+ ## 2016-07-01 (2.0.1)
165
+ * Fix problem when requiring json\_pure and Parser constant was defined top
166
+ level.
167
+ * Add `RB_GC_GUARD` to avoid possible GC problem via Pete Johns.
168
+ * Store `current_nesting` on stack by Aaron Patterson.
169
+
170
+ ## 2015-09-11 (2.0.0)
171
+ * Now complies to newest JSON RFC 7159.
172
+ * Implements compatibility to ruby 2.4 integer unification.
173
+ * Drops support for old rubies whose life has ended, that is rubies < 2.0.
174
+ Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
175
+ * There were still some mentions of dual GPL licensing in the source, but JSON
176
+ has just the Ruby license that itself includes an explicit dual-licensing
177
+ clause that allows covered software to be distributed under the terms of
178
+ the Simplified BSD License instead for all ruby versions >= 1.9.3. This is
179
+ however a GPL compatible license according to the Free Software Foundation.
180
+ I changed these mentions to be consistent with the Ruby license setting in
181
+ the gemspec files which were already correct now.
182
+
183
+ ## 2017-01-13 (1.8.6)
184
+ * Be compatible with ancient ruby 1.8 (maybe?)
185
+
186
+ ## 2015-09-11 (1.8.5)
187
+ * Be compatible with ruby 2.4.0
188
+ * There were still some mentions of dual GPL licensing in the source, but JSON
189
+ has just the Ruby license that itself includes an explicit dual-licensing
190
+ clause that allows covered software to be distributed under the terms of
191
+ the Simplified BSD License instead for all ruby versions >= 1.9.3. This is
192
+ however a GPL compatible license according to the Free Software Foundation.
193
+ I changed these mentions to be consistent with the Ruby license setting in
194
+ the gemspec files which were already correct now.
195
+
196
+ ## 2015-06-01 (1.8.3)
197
+ * Fix potential memory leak, thx to nobu.
198
+
199
+ ## 2015-01-08 (1.8.2)
200
+ * Some performance improvements by Vipul A M <vipulnsward@gmail.com>.
201
+ * Fix by Jason R. Clark <jclark@newrelic.com> to avoid mutation of
202
+ `JSON.dump_default_options`.
203
+ * More tests by Michael Mac-Vicar <mmacvicar@gmail.com> and fixing
204
+ `space_before` accessor in generator.
205
+ * Performance on Jruby improved by Ben Browning <bbrownin@redhat.com>.
206
+ * Some fixes to be compatible with the new Ruby 2.2 by Zachary Scott <e@zzak.io>
207
+ and SHIBATA Hiroshi <hsbt@ruby-lang.org>.
208
+
209
+ ## 2013-05-13 (1.8.1)
210
+ * Remove Rubinius exception since transcoding should be working now.
211
+
212
+ ## 2013-05-13 (1.8.0)
213
+ * Fix https://github.com/ruby/json/issues/162 reported by Marc-Andre
214
+ Lafortune <github_rocks@marc-andre.ca>. Thanks!
215
+ * Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress warning with
216
+ -Wchar-subscripts and better validate UTF-8 strings.
217
+ * Applied patch by ginriki@github to remove unnecessary if.
218
+ * Add load/dump interface to `JSON::GenericObject` to make
219
+ serialize :some_attribute, `JSON::GenericObject`
220
+ work in Rails active models for convenient `SomeModel#some_attribute.foo.bar`
221
+ access to serialised JSON data.
222
+
223
+ ## 2013-02-04 (1.7.7)
224
+ * Security fix for JSON create_additions default value and
225
+ `JSON::GenericObject`. It should not be possible to create additions unless
226
+ explicitly requested by setting the create_additions argument to true or
227
+ using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
228
+ be automatically deserialised, this has to be explicitly enabled by
229
+ setting
230
+ JSON::GenericObject.json_creatable = true
231
+ as well.
232
+ * Remove useless assert in fbuffer implementation.
233
+ * Apply patch attached to https://github.com/ruby/json/issues#issue/155
234
+ provided by John Shahid <jvshahid@gmail.com>, Thx!
235
+ * Add license information to rubygems spec data, reported by Jordi Massaguer Pla <jmassaguerpla@suse.de>.
236
+ * Improve documentation, thx to Zachary Scott <zachary@zacharyscott.net>.
237
+
238
+ ## 2012-11-29 (1.7.6)
239
+ * Add `GeneratorState#merge` alias for JRuby, fix state accessor methods. Thx to
240
+ jvshahid@github.
241
+ * Increase hash likeness of state objects.
242
+
243
+ ## 2012-08-17 (1.7.5)
244
+ * Fix compilation of extension on older rubies.
245
+
246
+ ## 2012-07-26 (1.7.4)
247
+ * Fix compilation problem on AIX, see https://github.com/ruby/json/issues/142
248
+
249
+ ## 2012-05-12 (1.7.3)
250
+ * Work around Rubinius encoding issues using iconv for conversion instead.
251
+
252
+ ## 2012-05-11 (1.7.2)
253
+ * Fix some encoding issues, that cause problems for the pure and the
254
+ extension variant in jruby 1.9 mode.
255
+
256
+ ## 2012-04-28 (1.7.1)
257
+ * Some small fixes for building
258
+
259
+ ## 2012-04-28 (1.7.0)
260
+ * Add `JSON::GenericObject` for method access to objects transmitted via JSON.
261
+
262
+ ## 2012-04-27 (1.6.7)
263
+ * Fix possible crash when trying to parse nil value.
264
+
265
+ ## 2012-02-11 (1.6.6)
266
+ * Propagate src encoding to values made from it (fixes 1.9 mode converting
267
+ everything to ascii-8bit; harmless for 1.8 mode too) (Thomas E. Enebo
268
+ <tom.enebo@gmail.com>), should fix
269
+ https://github.com/ruby/json/issues#issue/119.
270
+ * Fix https://github.com/ruby/json/issues#issue/124 Thx to Jason Hutchens.
271
+ * Fix https://github.com/ruby/json/issues#issue/117
272
+
273
+ ## 2012-01-15 (1.6.5)
274
+ * Vit Ondruch <v.ondruch@tiscali.cz> reported a bug that shows up when using
275
+ optimisation under GCC 4.7. Thx to him, Bohuslav Kabrda
276
+ <bkabrda@redhat.com> and Yui NARUSE <naruse@airemix.jp> for debugging and
277
+ developing a patch fix.
278
+
279
+ ## 2011-12-24 (1.6.4)
280
+ * Patches that improve speed on JRuby contributed by Charles Oliver Nutter
281
+ <headius@headius.com>.
282
+ * Support `object_class`/`array_class` with duck typed hash/array.
283
+
284
+ ## 2011-12-01 (1.6.3)
285
+ * Let `JSON.load('')` return nil as well to make mysql text columns (default to
286
+ `''`) work better for serialization.
287
+
288
+ ## 2011-11-21 (1.6.2)
289
+ * Add support for OpenStruct and BigDecimal.
290
+ * Fix bug when parsing nil in `quirks_mode`.
291
+ * Make JSON.dump and JSON.load methods better cooperate with Rails' serialize
292
+ method. Just use:
293
+ serialize :value, JSON
294
+ * Fix bug with time serialization concerning nanoseconds. Thanks for the
295
+ patch go to Josh Partlow (jpartlow@github).
296
+ * Improve parsing speed for JSON numbers (integers and floats) in a similar way to
297
+ what Evan Phoenix <evan@phx.io> suggested in:
298
+ https://github.com/ruby/json/pull/103
299
+
300
+ ## 2011-09-18 (1.6.1)
301
+ * Using -target 1.5 to force Java bits to compile with 1.5.
302
+
303
+ ## 2011-09-12 (1.6.0)
304
+ * Extract utilities (prettifier and GUI-editor) in its own gem json-utils.
305
+ * Split json/add/core into different files for classes to be serialised.
306
+
307
+ ## 2011-08-31 (1.5.4)
308
+ * Fix memory leak when used from multiple JRuby. (Patch by
309
+ jfirebaugh@github).
310
+ * Apply patch by Eric Wong <nocode@yhbt.net> that fixes garbage collection problem
311
+ reported in https://github.com/ruby/json/issues/46.
312
+ * Add :quirks_mode option to parser and generator.
313
+ * Add support for Rational and Complex number additions via json/add/complex
314
+ and json/add/rational requires.
315
+
316
+ ## 2011-06-20 (1.5.3)
317
+ * Alias State#configure method as State#merge to increase duck type synonymy with Hash.
318
+ * Add `as_json` methods in json/add/core, so rails can create its json objects the new way.
319
+
320
+ ## 2011-05-11 (1.5.2)
321
+ * Apply documentation patch by Cory Monty <cory.monty@gmail.com>.
322
+ * Add gemspecs for json and json\_pure.
323
+ * Fix bug in jruby pretty printing.
324
+ * Fix bug in `object_class` and `array_class` when inheriting from Hash or
325
+ Array.
326
+
327
+ ## 2011-01-24 (1.5.1)
328
+ * Made rake-compiler build a fat binary gem. This should fix issue
329
+ https://github.com/ruby/json/issues#issue/54.
330
+
331
+ ## 2011-01-22 (1.5.0)
332
+ * Included Java source codes for the Jruby extension made by Daniel Luz
333
+ <dev@mernen.com>.
334
+ * Output full exception message of `deep_const_get` to aid debugging.
335
+ * Fixed an issue with ruby 1.9 `Module#const_defined?` method, that was
336
+ reported by Riley Goodside.
337
+
338
+ ## 2010-08-09 (1.4.6)
339
+ * Fixed oversight reported in http://github.com/ruby/json/issues/closed#issue/23,
340
+ always create a new object from the state prototype.
341
+ * Made pure and ext api more similar again.
342
+
343
+ ## 2010-08-07 (1.4.5)
344
+ * Manage data structure nesting depth in state object during generation. This
345
+ should reduce problems with `to_json` method definіtions that only have one
346
+ argument.
347
+ * Some fixes in the state objects and additional tests.
348
+ ## 2010-08-06 (1.4.4)
349
+ * Fixes build problem for rubinius under OS X, http://github.com/ruby/json/issues/closed#issue/25
350
+ * Fixes crashes described in http://github.com/ruby/json/issues/closed#issue/21 and
351
+ http://github.com/ruby/json/issues/closed#issue/23
352
+ ## 2010-05-05 (1.4.3)
353
+ * Fixed some test assertions, from Ruby r27587 and r27590, patch by nobu.
354
+ * Fixed issue http://github.com/ruby/json/issues/#issue/20 reported by
355
+ electronicwhisper@github. Thx!
356
+
357
+ ## 2010-04-26 (1.4.2)
358
+ * Applied patch from naruse Yui NARUSE <naruse@airemix.com> to make building with
359
+ Microsoft Visual C possible again.
360
+ * Applied patch from devrandom <c1.github@niftybox.net> in order to allow building of
361
+ json_pure if extensiontask is not present.
362
+ * Thanks to Dustin Schneider <dustin@stocktwits.com>, who reported a memory
363
+ leak, which is fixed in this release.
364
+ * Applied 993f261ccb8f911d2ae57e9db48ec7acd0187283 patch from josh@github.
365
+
366
+ ## 2010-04-25 (1.4.1)
367
+ * Fix for a bug reported by Dan DeLeo <dan@kallistec.com>, caused by T_FIXNUM
368
+ being different on 32bit/64bit architectures.
369
+
370
+ ## 2010-04-23 (1.4.0)
371
+ * Major speed improvements and building with simplified
372
+ directory/file-structure.
373
+ * Extension should at least be compatible with MRI, YARV and Rubinius.
374
+
375
+ ## 2010-04-07 (1.2.4)
376
+ * Trigger const_missing callback to make Rails' dynamic class loading work.
377
+
378
+ ## 2010-03-11 (1.2.3)
379
+ * Added a `State#[]` method which returns an attribute's value in order to
380
+ increase duck type compatibility to Hash.
381
+
382
+ ## 2010-02-27 (1.2.2)
383
+ * Made some changes to make the building of the parser/generator compatible
384
+ to Rubinius.
385
+
386
+ ## 2009-11-25 (1.2.1)
387
+ * Added `:symbolize_names` option to Parser, which returns symbols instead of
388
+ strings in object names/keys.
389
+
390
+ ## 2009-10-01 (1.2.0)
391
+ * `fast_generate` now raises an exception for nan and infinite floats.
392
+ * On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
393
+ and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
394
+ functions are used to convert from all supported encodings. ASCII-8BIT
395
+ encoded strings are handled like all strings under Ruby 1.8 were.
396
+ * Better documentation
397
+
398
+ ## 2009-08-23 (1.1.9)
399
+ * Added forgotten main doc file `extra_rdoc_files`.
400
+
401
+ ## 2009-08-23 (1.1.8)
402
+ * Applied a patch by OZAWA Sakuro <sakuro@2238club.org> to make json/pure
403
+ work in environments that don't provide iconv.
404
+ * Applied patch by okkez_ in order to fix Ruby Bug #1768:
405
+ http://redmine.ruby-lang.org/issues/show/1768.
406
+ * Finally got around to avoid the rather paranoid escaping of ?/ characters
407
+ in the generator's output. The parsers aren't affected by this change.
408
+ Thanks to Rich Apodaca <rapodaca@metamolecular.com> for the suggestion.
409
+
410
+ ## 2009-06-29 (1.1.7)
411
+ * Security Fix for JSON::Pure::Parser. A specially designed string could
412
+ cause catastrophic backtracking in one of the parser's regular expressions
413
+ in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue.
414
+ Thanks to Bartosz Blimke <bartosz@new-bamboo.co.uk> for reporting this
415
+ problem.
416
+ * This release also uses a less strict ruby version requirement for the
417
+ creation of the mswin32 native gem.
418
+
419
+ ## 2009-05-10 (1.1.6)
420
+ * No changes. І tested native linux gems in the last release and they don't
421
+ play well with different ruby versions other than the one the gem was built
422
+ with. This release is just to bump the version number in order to skip the
423
+ native gem on rubyforge.
424
+
425
+ ## 2009-05-10 (1.1.5)
426
+ * Started to build gems with rake-compiler gem.
427
+ * Applied patch object/array class patch from Brian Candler
428
+ <B.Candler@pobox.com> and fixes.
429
+
430
+ ## 2009-04-01 (1.1.4)
431
+ * Fixed a bug in the creation of serialized generic rails objects reported by
432
+ Friedrich Graeter <graeter@hydrixos.org>.
433
+ * Deleted tests/runner.rb, we're using testrb instead.
434
+ * Editor supports Infinity in numbers now.
435
+ * Made some changes in order to get the library to compile/run under Ruby
436
+ 1.9.
437
+ * Improved speed of the code path for the fast_generate method in the pure
438
+ variant.
439
+
440
+ ## 2008-07-10 (1.1.3)
441
+ * Wesley Beary <monki@geemus.com> reported a bug in json/add/core's DateTime
442
+ handling: If the nominator and denominator of the offset were divisible by
443
+ each other Ruby's Rational#to_s returns them as an integer not a fraction
444
+ with '/'. This caused a ZeroDivisionError during parsing.
445
+ * Use Date#start and DateTime#start instead of sg method, while
446
+ remaining backwards compatible.
447
+ * Supports ragel >= 6.0 now.
448
+ * Corrected some tests.
449
+ * Some minor changes.
450
+
451
+ ## 2007-11-27 (1.1.2)
452
+ * Remember default dir (last used directory) in editor.
453
+ * JSON::Editor.edit method added, the editor can now receive json texts from
454
+ the clipboard via C-v.
455
+ * Load json texts from an URL pasted via middle button press.
456
+ * Added :create_additions option to Parser. This makes it possible to disable
457
+ the creation of additions by force, in order to treat json texts as data
458
+ while having additions loaded.
459
+ * Jacob Maine <jmaine@blurb.com> reported, that JSON(:foo) outputs a JSON
460
+ object if the rails addition is enabled, which is wrong. It now outputs a
461
+ JSON string "foo" instead, like suggested by Jacob Maine.
462
+ * Discovered a bug in the Ruby Bugs Tracker on rubyforge, that was reported
463
+ by John Evans lgastako@gmail.com. He could produce a crash in the JSON
464
+ generator by returning something other than a String instance from a
465
+ to_json method. I now guard against this by doing a rather crude type
466
+ check, which raises an exception instead of crashing.
467
+
468
+ ## 2007-07-06 (1.1.1)
469
+ * Yui NARUSE <naruse@airemix.com> sent some patches to fix tests for Ruby
470
+ 1.9. I applied them and adapted some of them a bit to run both on 1.8 and
471
+ 1.9.
472
+ * Introduced a `JSON.parse!` method without depth checking for people who
473
+ like danger.
474
+ * Made generate and `pretty_generate` methods configurable by an options hash.
475
+ * Added :allow_nan option to parser and generator in order to handle NaN,
476
+ Infinity, and -Infinity correctly - if requested. Floats, which aren't numbers,
477
+ aren't valid JSON according to RFC4627, so by default an exception will be
478
+ raised if any of these symbols are encountered. Thanks to Andrea Censi
479
+ <andrea.censi@dis.uniroma1.it> for his hint about this.
480
+ * Fixed some more tests for Ruby 1.9.
481
+ * Implemented dump/load interface of Marshal as suggested in ruby-core:11405
482
+ by murphy <murphy@rubychan.de>.
483
+ * Implemented the `max_nesting` feature for generate methods, too.
484
+ * Added some implementations for ruby core's custom objects for
485
+ serialisation/deserialisation purposes.
486
+
487
+ ## 2007-05-21 (1.1.0)
488
+ * Implemented max_nesting feature for parser to avoid stack overflows for
489
+ data from untrusted sources. If you trust the source, you can disable it
490
+ with the option max_nesting => false.
491
+ * Piers Cawley <pdcawley@bofh.org.uk> reported a bug, that not every
492
+ character can be escaped by `\` as required by RFC4627. There's a
493
+ contradiction between David Crockford's JSON checker test vectors (in
494
+ tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because
495
+ the JSON checker seems to be a bit older than the RFC.
496
+ * Extended license to Ruby License, which includes the GPL.
497
+ * Added keyboard shortcuts, and 'Open location' menu item to edit_json.rb.
498
+
499
+ ## 2007-05-09 (1.0.4)
500
+ * Applied a patch from Yui NARUSE <naruse@airemix.com> to make JSON compile
501
+ under Ruby 1.9. Thank you very much for mailing it to me!
502
+ * Made binary variants of JSON fail early, instead of falling back to the
503
+ pure version. This should avoid overshadowing of eventual problems while
504
+ loading of the binary.
505
+
506
+ ## 2007-03-24 (1.0.3)
507
+ * Improved performance of pure variant a bit.
508
+ * The ext variant of this release supports the mswin32 platform. Ugh!
509
+
510
+ ## 2007-03-24 (1.0.2)
511
+ * Ext Parser didn't parse 0e0 correctly into 0.0: Fixed!
512
+
513
+ ## 2007-03-24 (1.0.1)
514
+ * Forgot some object files in the build dir. I really like that - not!
515
+
516
+ ## 2007-03-24 (1.0.0)
517
+ * Added C implementations for the JSON generator and a ragel based JSON
518
+ parser in C.
519
+ * Much more tests, especially fixtures from json.org.
520
+ * Further improved conformance to RFC4627.
521
+
522
+ ## 2007-02-09 (0.4.3)
523
+ * Conform more to RFC4627 for JSON: This means JSON strings
524
+ now always must contain exactly one object `"{ ... }"` or array `"[ ... ]"` in
525
+ order to be parsed without raising an exception. The definition of what
526
+ constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and
527
+ there are differences in floats and integers (no octals or hexadecimals) as
528
+ well.
529
+ * Added aliases generate and `pretty_generate` of unparse and `pretty_unparse`.
530
+ * Fixed a test case.
531
+ * Catch an `Iconv::InvalidEncoding` exception, that seems to occur on some Sun
532
+ boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was
533
+ reported by Andrew R Jackson <andrewj@bcm.tmc.edu>, thanks a bunch!
534
+
535
+ ## 2006-08-25 (0.4.2)
536
+ * Fixed a bug in handling solidi (/-characters), that was reported by
537
+ Kevin Gilpin <kevin.gilpin@alum.mit.edu>.
538
+
539
+ ## 2006-02-06 (0.4.1)
540
+ * Fixed a bug related to escaping with backslashes. Thanks for the report go
541
+ to Florian Munz <surf@theflow.de>.
542
+
543
+ ## 2005-09-23 (0.4.0)
544
+ * Initial Rubyforge Version
data/COPYING CHANGED
@@ -1,6 +1,6 @@
1
- Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>.
2
- You can redistribute it and/or modify it under either the terms of the GPL
3
- (see GPL file), or the conditions below:
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the
3
+ 2-clause BSDL (see the file BSDL), or the conditions below:
4
4
 
5
5
  1. You may make and give away verbatim copies of the source form of the
6
6
  software without restriction, provided that you duplicate all of the
@@ -17,37 +17,36 @@ You can redistribute it and/or modify it under either the terms of the GPL
17
17
  b) use the modified software only within your corporation or
18
18
  organization.
19
19
 
20
- c) rename any non-standard executables so the names do not conflict
21
- with standard executables, which must also be provided.
20
+ c) give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
22
 
23
23
  d) make other distribution arrangements with the author.
24
24
 
25
- 3. You may distribute the software in object code or executable
26
- form, provided that you do at least ONE of the following:
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
27
 
28
- a) distribute the executables and library files of the software,
28
+ a) distribute the binaries and library files of the software,
29
29
  together with instructions (in the manual page or equivalent)
30
30
  on where to get the original distribution.
31
31
 
32
32
  b) accompany the distribution with the machine-readable source of
33
33
  the software.
34
34
 
35
- c) give non-standard executables non-standard names, with
35
+ c) give non-standard binaries non-standard names, with
36
36
  instructions on where to get the original software distribution.
37
37
 
38
38
  d) make other distribution arrangements with the author.
39
39
 
40
40
  4. You may modify and include the part of the software into any other
41
41
  software (possibly commercial). But some files in the distribution
42
- are not written by the author, so that they are not under this terms.
42
+ are not written by the author, so that they are not under these terms.
43
43
 
44
- They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some
45
- files under the ./missing directory. See each file for the copying
46
- condition.
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
47
46
 
48
- 5. The scripts and library files supplied as input to or produced as
47
+ 5. The scripts and library files supplied as input to or produced as
49
48
  output from the software do not automatically fall under the
50
- copyright of the software, but belong to whomever generated them,
49
+ copyright of the software, but belong to whomever generated them,
51
50
  and may be sold commercially, and may be aggregated with this
52
51
  software.
53
52
 
@@ -55,4 +54,3 @@ You can redistribute it and/or modify it under either the terms of the GPL
55
54
  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
56
55
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
57
56
  PURPOSE.
58
-