Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Replaced OrderedHash usage with Ruby 1.9 Hash | Uddhava | 2012-02-09 | 1 | -3/+1 |
| | |||||
* | fixes in api docs | Vijay Dev | 2012-01-13 | 1 | -2/+2 |
| | |||||
* | Remove Array.wrap calls in ActiveSupport | Rafael Mendonça França | 2012-01-06 | 1 | -3/+2 |
| | |||||
* | use #to_s to convert Range to json | Sergey Nartimov | 2012-01-01 | 1 | -0/+4 |
| | |||||
* | remove checks for encodings availability | Sergey Nartimov | 2011-12-25 | 1 | -5/+3 |
| | |||||
* | Revert "Implement ArraySerializer and move old serialization API to a new ↵ | José Valim | 2011-11-30 | 1 | -1/+1 |
| | | | | | | | | | | | | | namespace." This reverts commit 8896b4fdc8a543157cdf4dfc378607ebf6c10ab0. Conflicts: activemodel/lib/active_model.rb activemodel/lib/active_model/serializable.rb activemodel/lib/active_model/serializer.rb activemodel/test/cases/serializer_test.rb | ||||
* | Implement ArraySerializer and move old serialization API to a new namespace. | José Valim | 2011-11-23 | 1 | -4/+4 |
| | | | | | | | | | | | | | The following constants were renamed: ActiveModel::Serialization => ActiveModel::Serializable ActiveModel::Serializers::JSON => ActiveModel::Serializable::JSON ActiveModel::Serializers::Xml => ActiveModel::Serializable::XML The main motivation for such a change is that `ActiveModel::Serializers::JSON` was not actually a serializer, but a module that when included allows the target to be serializable to JSON. With such changes, we were able to clean up the namespace to add true serializers as the ArraySerializer. | ||||
* | Set the default options value for as_json in the encoder object. | José Valim | 2011-09-30 | 1 | -2/+2 |
| | |||||
* | Removed deprecated methods and related tests from ActiveSupport | Josh Kalderimis | 2011-05-25 | 1 | -3/+0 |
| | |||||
* | Use set data structure to speed up circular reference checks on large/deeply ↵ | Andy Lindeman | 2011-05-23 | 1 | -4/+4 |
| | | | | nested objects | ||||
* | add missing require for ordered_hash dependency | Corin Langosch | 2011-05-11 | 1 | -0/+1 |
| | |||||
* | Enumerable should pass encoding options to children in #as_json/#to_json. | John Firebaugh | 2011-04-01 | 1 | -1/+3 |
| | |||||
* | Updated the json date regex to recognize xmlschema formatted date times ↵ | Josh Kalderimis | 2011-02-12 | 1 | -1/+1 |
| | | | | | | during json decoding. [#3031 state:resolved] Signed-off-by: Santiago Pastorino and Emilio Tagua <santiago+emilioe@wyeworks.com> | ||||
* | Complex struct encoding fix | Alexey Nayden | 2011-01-15 | 1 | -0/+6 |
| | | | | | | [#6077 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Perf: speed up json encoding. | Emilio Tagua | 2010-09-22 | 1 | -3/+2 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | fixed some issues with JSON encoding | Jakub Suder | 2010-09-07 | 1 | -6/+44 |
| | | | | | | | | | | | - as_json in ActiveModel should return a hash and handle :only/:except/:methods options - Array and Hash should call as_json on their elements - json methods should not modify options argument [#5374 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Move Date#xmlschema to conversions and add a missing require | Santiago Pastorino | 2010-07-04 | 1 | -0/+2 |
| | |||||
* | Time#formatted_offset is defined in core_ext/time/conversions | Santiago Pastorino | 2010-07-02 | 1 | -0/+1 |
| | | | | [#4979] | ||||
* | Time#as_json: use Time#formatted_offset instead of strftime %z directive, ↵ | Geoff Buesing | 2010-07-02 | 1 | -1/+1 |
| | | | | | | | | which is non-standard and inaccurate on some platforms (e.g., Mac OS X). [#4979] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Time has it own implementation of xmlschema, now AMo doesn't depend on TZInfo | Santiago Pastorino | 2010-07-02 | 1 | -2/+2 |
| | | | | | | [#4979 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | AS json refactor, move to_json implementation to core_ext and a cleanup a ↵ | Santiago Pastorino | 2010-07-01 | 1 | -31/+6 |
| | | | | bit the code | ||||
* | Work around the fact the JSON gem was overwriting to_json implementation for ↵ | José Valim | 2010-06-26 | 1 | -5/+14 |
| | | | | | | | all Ruby core classes. This is required because the JSON gem is incompatible with Rails behavior and was not allowing ActiveModel::Errors to be serialized. So we need to ensure Rails implementation is the one triggered. [#4890 state:resolved] | ||||
* | adds a comment explaining why BigDecimal#as_json returns a JSON string | Xavier Noria | 2010-05-03 | 1 | -1/+9 |
| | |||||
* | Missing require added make pass activesupport/test/json/encoding_test.rb in ↵ | Santiago Pastorino | 2010-05-02 | 1 | -0/+1 |
| | | | | | | isolation Signed-off-by: Xavier Noria <fxn@hashref.com> | ||||
* | use ordinary syntax for options to be well-formed in 1.8 | Xavier Noria | 2010-04-27 | 1 | -1/+1 |
| | |||||
* | JSON: encode objects that don't have a native JSON representation using ↵ | Jeremy Kemper | 2010-04-26 | 1 | -5/+19 |
| | | | | to_hash, if available, instead of instance_values (the old fallback) or to_s (other encoders' default). Encode BigDecimal and Regexp encode as strings to conform with other encoders. Try to transcode non-UTF-8 strings. | ||||
* | Changed the default ActiveSupport.use_standard_json_time_format from false ↵ | David Heinemeier Hansson | 2010-01-03 | 1 | -1/+2 |
| | | | | | | to true and ActiveSupport.escape_html_entities_in_json from true to false to match previously announced Rails 3 defaults [DHH] | ||||
* | Fix ActiveSupport::JSON encoding of control characters [\x00-\x1f] | Dwayne Litzenberger | 2009-12-23 | 1 | -2/+11 |
| | | | | | | | | | | | | | | According to RFC 4627, only the following Unicode code points are allowed unescaped in JSON: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF However, ActiveSupport::JSON did not escape the range %x00-1f. This caused parse errors when trying to decode the resulting output. [#3345 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Repair time dependencies | Jeremy Kemper | 2009-11-14 | 1 | -1/+1 |
| | |||||
* | Clarify date/time dependencies | Jeremy Kemper | 2009-11-02 | 1 | -3/+0 |
| | |||||
* | JSON.escape returns UTF-8 strings | Jeremy Kemper | 2009-07-01 | 1 | -5/+7 |
| | | | | [#2849 state:resolved] | ||||
* | uses Hash#except/slice | Jeremy Kemper | 2009-07-01 | 1 | -0/+2 |
| | |||||
* | Add basic JSON serializer to AMo | Joshua Peek | 2009-06-17 | 1 | -0/+5 |
| | |||||
* | Ruby 1.9: fix json encoding | Jeremy Kemper | 2009-06-08 | 1 | -1/+2 |
| | |||||
* | JSON: split encoding and coercion | Jeremy Kemper | 2009-06-08 | 1 | -24/+205 |
| | |||||
* | Use __send__ for BasicObject friendliness | Jeremy Kemper | 2009-04-26 | 1 | -1/+1 |
| | |||||
* | Now that we have a separate internal rails_to_json, use a separate circular ↵ | Jeremy Kemper | 2009-04-26 | 1 | -6/+7 |
| | | | | reference stack instead of sticking it in the options hash | ||||
* | Only Object to_json alias is needed. Prefer nil options. | Jeremy Kemper | 2009-04-26 | 1 | -1/+2 |
| | |||||
* | Track object ids so the objects needn't respond to == | Jeremy Kemper | 2009-04-26 | 1 | -2/+2 |
| | |||||
* | * Add pluggable JSON backends with support for the JSON gem. [rick] | rick | 2009-04-23 | 1 | -1/+1 |
| | | | | | | | | | | | | | | Example: ActiveSupport::JSON.backend = "JSONGem" All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode(). Use of #to_json is not recommended, as it may clash with other libraries that overwrite it. However, you can recover Rails specific functionality if you really want to use #to_json. gem 'json' ActiveSupport::JSON.backend = "JSONGem" class ActiveRecord::Base alias to_json rails_to_json end | ||||
* | Simpler and clearer to just explicitly require the JSON encoders | Jeremy Kemper | 2008-11-26 | 1 | -9/+15 |
| | |||||
* | Eliminate thread-local circular reference stack by passing it as an argument ↵ | Jeremy Kemper | 2008-11-23 | 1 | -20/+8 |
| | | | | instead | ||||
* | Add config.active_support.escape_html_entities_in_json to allow disabling of ↵ | Rick Olson | 2008-04-08 | 1 | -1/+0 |
| | | | | | | html entity escaping. [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Hash#to_json takes :only or :except options to specific or omit certain hash ↵ | Jeremy Kemper | 2007-10-04 | 1 | -2/+2 |
| | | | | | | 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 | ||||
* | Fixed JSON encoding to use quoted keys according to the JSON standard ↵ | David Heinemeier Hansson | 2007-09-30 | 1 | -12/+0 |
| | | | | | | (closes #8762) [choonkat/chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Silence some warnings. | Jeremy Kemper | 2007-05-18 | 1 | -2/+7 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Refactor ActiveSupport::JSON to be less obtuse. Add support for JSON ↵ | Sam Stephenson | 2007-03-18 | 1 | -0/+45 |
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 |