Commit Graph

13 Commits

Author SHA1 Message Date
Jeremy Kemper f6d8526659 require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:31:04 +00:00
Jeremy Kemper aa4ad404c6 Ruby 1.9 compat: shadowed vars, kcode
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8402 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:28:20 +00:00
Michael Koziarski 92f02adf40 Don't escape forward slashes with String#to_json, our unicode encoding of < and > prevent the XSS problems. [tpope] Closes #10273
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8255 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-02 08:45:35 +00:00
Rick Olson c708346688 Change JSON to encode %w(< > &) as 4 digit hex codes to be in compliance with the JSON spec. Closes #9975 [josh, chuyeow, tpope]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8050 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-29 00:18:43 +00:00
Rick Olson 34c125d774 Fix JSON encoding/decoding bugs dealing with /'s. Closes #9990 [Rick, theamazingrando]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8026 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-26 03:22:02 +00:00
Jeremy Kemper 7c3581cba2 Document Enumerable and Hash #to_json. Add test for hash with integer key. Closes #9970.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-24 16:21:46 +00:00
Jeremy Kemper 58a5eef53e Disambiguate Time, Date, and DateTime#to_json formatting. Closes #9750.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 09:43:24 +00:00
Jeremy Kemper b1968708e1 Hash#to_json takes :only or :except options to specific or omit certain hash keys. Enumerable#to_json passes through its options to each element. Closes #9751.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-04 03:28:42 +00:00
David Heinemeier Hansson 7275d2749c Fixed JSON encoding to use quoted keys according to the JSON standard (closes #8762) [choonkat/chuyeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-30 20:57:50 +00:00
Rick Olson 0345c97587 escape <'s and >'s in JSON strings. #8371 [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 09:10:36 +00:00
Jeremy Kemper 7b99b40352 Fix JSON date/time conversion tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-23 08:43:48 +00:00
Jeremy Kemper fd15359104 Date, Time, and DateTime#to_json. Closes #8399.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 21:20:35 +00:00
Sam Stephenson 3202fbabe6 Refactor ActiveSupport::JSON to be less obtuse. Add support for JSON decoding by way of Syck with ActiveSupport::JSON.decode(json_string). Prevent hash keys that are JavaScript reserved words from being unquoted during encoding.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6443 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-18 07:05:58 +00:00