summaryrefslogtreecommitdiff
path: root/lib/json
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 2.6.3v2.6.3Hiroshi SHIBATA2022-12-051-1/+1
|
* Merge pull request #483 from notEthan/unicode_mixedHiroshi SHIBATA2022-06-141-1/+1
|\ | | | | bugfix json/pure mixing escaped with literal unicode raises Encoding::CompatibilityError
| * fix parsing of unicode, mixing literal characters with escaped, by forcing ↵Ethan2022-02-081-1/+1
| | | | | | | | encoding back to ASCII_8BIT before gsubing back into parse_string result
* | Bump version to 2.6.2Florian Frank2022-05-161-1/+1
|/
* Bump version to v2.6.1v2.6.1Hiroshi SHIBATA2021-10-241-1/+1
|
* Bump JSON::VERSION to 2.6.0.Josef Šimánek2021-10-241-1/+1
|
* Fix some typosRyuta Kamizono2021-04-261-1/+1
|
* Bump version to 2.5.1v2.5.1Hiroshi SHIBATA2020-12-221-1/+1
|
* Added backword compatible for < json-2.5Hiroshi SHIBATA2020-12-221-0/+2
|
* Bump version to 2.5.0v2.5.0Hiroshi SHIBATA2020-12-221-1/+1
|
* Workaround for JRubyHiroshi SHIBATA2020-12-221-0/+1
|
* [json] Avoid method redefinitionKenta Murata2020-12-221-9/+9
|
* [json] Make JSON.create_id thread-safeKenta Murata2020-12-221-1/+14
|
* [json] Stop using prototype objectsKenta Murata2020-12-221-8/+13
|
* Bump version to json-2.4.1v2.4.1Hiroshi SHIBATA2020-12-171-1/+1
|
* Update version.rb from rake version taskHiroshi SHIBATA2020-12-171-1/+1
|
* Complex and Rational is embedded classes nowHiroshi SHIBATA2020-11-122-2/+0
|
* Merge pull request #447 from Shopify/global-freeze-optionHiroshi SHIBATA2020-10-201-0/+14
|\ | | | | Implement a freeze: parser option
| * Implement a freeze: parser optionJean Boussier2020-09-151-0/+14
| | | | | | | | | | | | | | If set to true all parsed objects will be immediately frozen, and strings will be deduplicated if the Ruby implementation allows it.
* | Fix an issue with generate_pretty and empty objects in the Ruby and Java ↵Chris Seaton2020-10-071-2/+4
| | | | | | | | implementations
* | Fix JSON.load_file docJean Boussier2020-09-091-3/+3
|/
* Partial compliance with doc/method_documentation.rdocBurdetteLamar2020-08-201-17/+7
|
* Merge pull request #425 from marcandre/fix_pure_parserHiroshi SHIBATA2020-08-141-2/+6
|\ | | | | Fix pure parser with unclosed arrays / objects [Fix #314]
| * Fix pure parser with unclosed arrays / objects [Fix #314]Marc-Andre Lafortune2020-06-301-2/+6
| |
* | Enhanced RDoc for JSON.dump (#443)Burdette Lamar2020-08-141-11/+23
| | | | | | * Enhanced RDoc for JSON.dump
* | Merge pull request #405 from Shopify/escape-slash-2.3.0NARUSE, Yui2020-07-312-7/+26
|\ \ | | | | | | Add an option to escape forward slash character
| * | Add an option to escape forward slash characterJean Boussier2020-07-042-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 26d181059989279a79c433cedcd893b4f52e42ee Author: Francois Chagnon <francois.chagnon@jadedpixel.com> Date: Tue Sep 15 21:17:34 2015 +0000 add config options for escape_slash commit fa282334051b16df91ca097dd7304b46f3bc7719 Author: Francois Chagnon <francois.chagnon@jadedpixel.com> Date: Mon Feb 9 21:09:33 2015 +0000 add forward slash to escape character
* | | Nodoc for recurse_procBurdetteLamar2020-07-291-1/+1
| | |
* | | RDoc for JSON.load with procBurdetteLamar2020-07-281-18/+58
| | |
* | | RDoc example for JSON.loadBurdetteLamar2020-07-041-13/+87
| | |
* | | Enhance RDoc for JSON.parseBurdetteLamar2020-07-031-9/+40
|/ /
* | Merge pull request #430 from BurdetteLamar/masterHiroshi SHIBATA2020-07-021-177/+10
|\ \ | | | | | | Move options from #generate and #parse to common area
| * | Move options from #generate and #parse to common areaBurdetteLamar2020-06-301-177/+10
| |/
* | Bump version to 2.3.1v2.3.1Hiroshi SHIBATA2020-07-011-1/+1
| |
* | Add `load_file` and `load_file!` methods, with tests. Fixes issue #386.Keith Bennett2020-06-301-0/+10
| |
* | Fix alignmentMarc-Andre Lafortune2020-06-301-1/+1
|/
* Added :call-seq: to RDOc for some methodsBurdetteLamar2020-06-281-0/+12
|
* Merge pull request #413 from BurdetteLamar/masterHiroshi SHIBATA2020-06-281-92/+312
|\ | | | | Rdoc enhancements
| * RDoc enhancementsBurdetteLamar2020-06-251-17/+1
| |
| * RDoc enhancementsBurdetteLamar2020-06-251-6/+6
| |
| * RDoc enhancementsBurdetteLamar2020-06-251-26/+1
| |
| * Rdoc enhancementsBurdetteLamar2020-05-061-92/+353
| |
* | Merge pull request #191 from jkanywhere/spell-fixesHiroshi SHIBATA2020-06-252-2/+2
|\ \ | |/ |/| Spelling and grammar fixes for comments.
| * Spelling and grammar fixes for comments.Josh Kline2013-12-282-2/+2
| |
* | Enchance generic JSON and #generate docszverok2019-12-291-13/+16
| |
* | Bump versions for 2.3.0.Charles Oliver Nutter2019-12-091-1/+1
| |
* | Merge branch 'zenspider/ruby-2.7' of https://github.com/zenspider/json into ↵Hiroshi SHIBATA2019-11-292-2/+11
|\ \ | | | | | | | | | zenspider-zenspider/ruby-2.7
| * | Fix warning from trying to access an uninitialized ivar.Ryan Davis2019-11-271-1/+2
| | | | | | | | | | | | Signed-off-by: Ryan Davis <zenspider@chef.io>
| * | Minor cleanup for ruby 2.7 warnings and failures.Ryan Davis2019-11-272-3/+12
| | |
* | | Make rb_scan_args handle keywords more similar to Ruby methods (#2460)Jeremy Evans2019-10-311-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cfuncs that use rb_scan_args with the : entry suffer similar keyword argument separation issues that Ruby methods suffer if the cfuncs accept optional or variable arguments. This makes the following changes to : handling. * Treats as **kw, prompting keyword argument separation warnings if called with a positional hash. * Do not look for an option hash if empty keywords are provided. For backwards compatibility, treat an empty keyword splat as a empty mandatory positional hash argument, but emit a a warning, as this behavior will be removed in Ruby 3. The argument number check needs to be moved lower so it can correctly handle an empty positional argument being added. * If the last argument is nil and it is necessary to treat it as an option hash in order to make sure all arguments are processed, continue to treat the last argument as the option hash. Emit a warning in this case, as this behavior will be removed in Ruby 3. * If splitting the keyword hash into two hashes, issue a warning, as we will not be splitting hashes in Ruby 3. * If the keyword argument is required to fill a mandatory positional argument, continue to do so, but emit a warning as this behavior will be going away in Ruby 3. * If keyword arguments are provided and the last argument is not a hash, that indicates something wrong. This can happen if a cfunc is calling rb_scan_args multiple times, and providing arguments that were not passed to it from Ruby. Callers need to switch to the new rb_scan_args_kw function, which allows passing of whether keywords were provided. This commit fixes all warnings caused by the changes above. It switches some function calls to *_kw versions with appropriate kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS is used. If creating new arguments, RB_PASS_KEYWORDS is used if the last argument is a hash to be treated as keywords. In open_key_args in io.c, use rb_scan_args_kw. In this case, the arguments provided come from another C function, not Ruby. The last argument may or may not be a hash, so we can't set keyword argument mode. However, if it is a hash, we don't want to warn when treating it as keywords. In Ruby files, make sure to appropriately use keyword splats or literal keywords when calling Cfuncs that now issue keyword argument separation warnings through rb_scan_args. Also, make sure not to pass nil in place of an option hash. Work around Kernel#warn warnings due to problems in the Rubygems override of the method. There is an open pull request to fix these issues in Rubygems, but part of the Rubygems tests for their override fail on ruby-head due to rb_scan_args not recognizing empty keyword splats, which this commit fixes. Implementation wise, adding rb_scan_args_kw is kind of a pain, because rb_scan_args takes a variable number of arguments. In order to not duplicate all the code, the function internals need to be split into two functions taking a va_list, and to avoid passing in a ton of arguments, a single struct argument is used to handle the variables previously local to the function.