aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/encoding.rb
Commit message (Collapse)AuthorAgeFilesLines
* update AS/json docs [ci skip]Francesco Rodriguez2012-09-141-10/+16
|
* Add back missing requireRafael Mendonça França2012-08-071-0/+1
|
* fixing :nodoc:s in AS::JSON::EncodingFrancesco Rodriguez2012-07-211-15/+48
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-06-021-1/+1
|\
| * Fix typo [ci skip]Erich Menge2012-05-301-1/+1
| |
* | Merge pull request #6554 from erichmenge/remove-json-variablePiotr Sarnacki2012-05-301-1/+0
|\ \ | |/ |/| Remove deprecated ActiveSupport::JSON::Variable.
| * Remove deprecated ActiveSupport::JSON::Variable.Erich Menge2012-05-301-1/+0
| |
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-05-301-1/+4
|\ \ | |/ |/|
| * add example to ActiveSupport::JSON.encode [ci skip]Francesco Rodriguez2012-05-281-1/+4
| |
* | True, False, and Nil should be represented in as_json as themselves.Erich Menge2012-05-291-9/+9
|/
* Since escape_html_entities_in_json was moved to 3-2-stable, make it true in ↵José Valim2012-05-141-1/+1
| | | | AS, closes #6287
* BigDecimal string wrapping in JSON serialization can now be opted-out, fixes ↵David FRANCOIS2012-05-021-1/+14
| | | | #6033
* JSON: encode BigDecimal NaN/Infinity as null.Sebi Burkhard2012-05-011-1/+3
|
* Merge pull request #2532 from ↵Piotr Sarnacki2012-04-301-0/+4
|\ | | | | | | | | hasclass/as_json__encode_infinite_and_nan_floats_as_null JSON: Encode infinite or NaN floats as `null` to generate valid JSON.
| * JSON: Encode infinite or NaN floats as null to generate valid JSON.Sebi Burkhard2011-08-151-0/+4
| |
* | Replaced OrderedHash usage with Ruby 1.9 HashUddhava2012-02-091-3/+1
| |
* | fixes in api docsVijay Dev2012-01-131-2/+2
| |
* | Remove Array.wrap calls in ActiveSupportRafael Mendonça França2012-01-061-3/+2
| |
* | use #to_s to convert Range to jsonSergey Nartimov2012-01-011-0/+4
| |
* | remove checks for encodings availabilitySergey Nartimov2011-12-251-5/+3
| |
* | Revert "Implement ArraySerializer and move old serialization API to a new ↵José Valim2011-11-301-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é Valim2011-11-231-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é Valim2011-09-301-2/+2
|/
* Removed deprecated methods and related tests from ActiveSupportJosh Kalderimis2011-05-251-3/+0
|
* Use set data structure to speed up circular reference checks on large/deeply ↵Andy Lindeman2011-05-231-4/+4
| | | | nested objects
* add missing require for ordered_hash dependencyCorin Langosch2011-05-111-0/+1
|
* Enumerable should pass encoding options to children in #as_json/#to_json.John Firebaugh2011-04-011-1/+3
|
* Updated the json date regex to recognize xmlschema formatted date times ↵Josh Kalderimis2011-02-121-1/+1
| | | | | | during json decoding. [#3031 state:resolved] Signed-off-by: Santiago Pastorino and Emilio Tagua <santiago+emilioe@wyeworks.com>
* Complex struct encoding fixAlexey Nayden2011-01-151-0/+6
| | | | | | [#6077 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Perf: speed up json encoding.Emilio Tagua2010-09-221-3/+2
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* fixed some issues with JSON encodingJakub Suder2010-09-071-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 requireSantiago Pastorino2010-07-041-0/+2
|
* Time#formatted_offset is defined in core_ext/time/conversionsSantiago Pastorino2010-07-021-0/+1
| | | | [#4979]
* Time#as_json: use Time#formatted_offset instead of strftime %z directive, ↵Geoff Buesing2010-07-021-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 TZInfoSantiago Pastorino2010-07-021-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 Pastorino2010-07-011-31/+6
| | | | bit the code
* Work around the fact the JSON gem was overwriting to_json implementation for ↵José Valim2010-06-261-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 stringXavier Noria2010-05-031-1/+9
|
* Missing require added make pass activesupport/test/json/encoding_test.rb in ↵Santiago Pastorino2010-05-021-0/+1
| | | | | | isolation Signed-off-by: Xavier Noria <fxn@hashref.com>
* use ordinary syntax for options to be well-formed in 1.8Xavier Noria2010-04-271-1/+1
|
* JSON: encode objects that don't have a native JSON representation using ↵Jeremy Kemper2010-04-261-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 Hansson2010-01-031-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 Litzenberger2009-12-231-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 dependenciesJeremy Kemper2009-11-141-1/+1
|
* Clarify date/time dependenciesJeremy Kemper2009-11-021-3/+0
|
* JSON.escape returns UTF-8 stringsJeremy Kemper2009-07-011-5/+7
| | | | [#2849 state:resolved]
* uses Hash#except/sliceJeremy Kemper2009-07-011-0/+2
|
* Add basic JSON serializer to AMoJoshua Peek2009-06-171-0/+5
|
* Ruby 1.9: fix json encodingJeremy Kemper2009-06-081-1/+2
|
* JSON: split encoding and coercionJeremy Kemper2009-06-081-24/+205
|