summaryrefslogtreecommitdiff
path: root/ext/json/lib/json.rb
AgeCommit message (Collapse)Author
2024-11-05[ruby/json] ResyncJean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/12003
2024-10-26[ruby/json] Modernize heredocsJean Boussier
https://github.com/ruby/json/commit/fb25e94aea
2024-10-26Use frozen string literalsÉtienne Barrié
Co-authored-by: Jean Boussier <[email protected]>
2023-12-01Rename escape_slash in script_safe and also escape E+2028 and E+2029Jean Boussier
It is rather common to directly interpolate JSON string inside <script> tags in HTML as to provide configuration or parameters to a script. However this may lead to XSS vulnerabilities, to prevent that 3 characters need to be escaped: - `/` (forward slash) - `U+2028` (LINE SEPARATOR) - `U+2029` (PARAGRAPH SEPARATOR) The forward slash need to be escaped to prevent closing the script tag early, and the other two are valid JSON but invalid Javascript and can be used to break JS parsing. Given that the intent of escaping forward slash is the same than escaping U+2028 and U+2029, I chos to rename and repurpose the existing `escape_slash` option.
2021-05-17[flori/json] Fix incorrect `#` position in API docMasafumi Koba
This change fixes an incorrect `#` position in the API documentation of the `JSON` module. https://github.com/flori/json/commit/dc4b62424f
2020-09-25[flori/json] RDoc example for JSON.loadBurdetteLamar
https://github.com/flori/json/commit/e4eead665c Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Move options from #generate and #parse to common areaBurdetteLamar
https://github.com/flori/json/commit/20d7be605a Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-07-01[flori/json] RDoc enhancementsBurdetteLamar
https://github.com/flori/json/commit/470d909c0d
2020-07-01[flori/json] RDoc enhancementsBurdetteLamar
https://github.com/flori/json/commit/7bee2c7c13
2020-07-01[flori/json] Rdoc enhancementsBurdetteLamar
https://github.com/flori/json/commit/e7e3732130
2020-01-06[flori/json] Fix examples syntaxzverok
https://github.com/flori/json/commit/3845491d92
2020-01-06[flori/json] Enchance generic JSON and #generate docszverok
https://github.com/flori/json/commit/4ede0a7d19
2020-01-06[flori/json] Remove invalid JSON.generate description from JSON module rdocJeremy Evans
This text used to be true in older versions of json, but has not been true for a number of years (since json version 2 I think). https://github.com/flori/json/commit/373b633f38
2016-07-14* ext/json/**/*.rb: merge original files from upstream repository.hsbt
It only fixes styles of frozen string literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* ext/json/*, test/json/*: Reverted r50231. Because it's not works withhsbt
cross-compile environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11* ext/json/*, test/json/*, defs/default_gems: Gemify JSON library.hsbt
[fix GH-867][Feature #11057] * test/ruby/test_extlibs.rb: removed json gem from existence extentions. * gems/bundled_gems: added json gem into bundled gem. * lib/rdoc/rubygems_hook.rb: ignored no json environment. * lib/rubygems/test_case.rb, test/rubygems/*: ditto. * lib/rdoc/test_case.rb, test/rdoc/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-04* ext/json/lib/json.rb: Move module overview definition for rdoczzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).naruse
[Bug #5173] [ruby-core:38866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10* ext/json: Merge json gem 1.5.4+ (f7f78896607b6f6226cd).naruse
[Bug #4700] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-04* ext/json/lib/**/*.rb: not executable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-01* ext/json: Update to JSON 1.1.9.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-05Update to JSON 1.1.4.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-04* lib/json.rb, lib/json/*: moved to ext/json/lib.naruse
-- M trunk/ChangeLog D trunk/lib/json D trunk/lib/json.rb A trunk/ext/json/lib A trunk/ext/json/lib/json A trunk/ext/json/lib/json.rb A trunk/ext/json/extconf.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e