Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #248 from bigfix/enumerable_as_json | José Valim | 2011-05-07 | 1 | -9/+24 |
|\ | | | | | Enumerable should pass encoding options to children in #as_json/#to_json | ||||
| * | Enumerable should pass encoding options to children in #as_json/#to_json. | John Firebaugh | 2011-04-01 | 1 | -9/+24 |
| | | |||||
* | | AS Json parse_error makes a return for backwards compatibility, although it ↵ | Josh Kalderimis | 2011-04-19 | 1 | -1/+1 |
| | | | | | | | | will return MultiJson::DecodeError | ||||
* | | removed AS backends and instead rely on MultiJson for json decoding | Josh Kalderimis | 2011-04-18 | 1 | -7/+4 |
|/ | |||||
* | parse dates to yaml in json arrays | Diego Carrion | 2011-03-22 | 1 | -0/+2 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | test json decoding with time parsing disabled with all backends and respect ↵ | Diego Carrion | 2011-03-22 | 1 | -4/+2 |
| | | | | | | ActiveSupport.parse_json_times when converting to yaml Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Updated the json date regex to recognize xmlschema formatted date times ↵ | Josh Kalderimis | 2011-02-12 | 1 | -0/+4 |
| | | | | | | during json decoding. [#3031 state:resolved] Signed-off-by: Santiago Pastorino and Emilio Tagua <santiago+emilioe@wyeworks.com> | ||||
* | Fixes an issue when decoding a json string which looks like a date but is ↵ | Josh Kalderimis | 2011-02-11 | 1 | -0/+2 |
| | | | | | | invalid. This DateTime parse error is now caught and the original string is instead passed back [#6286 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Fix tests providing valid JSON | Santiago Pastorino | 2011-02-02 | 1 | -2/+2 |
| | |||||
* | Fix JSON decoding of newline character with Yaml backend [#3479 state:resolved] | Maxime RETY | 2011-02-02 | 1 | -1/+5 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | use ! " " YAML string literal syntax rather than removing both quotes | Aaron Patterson | 2011-01-21 | 1 | -3/+1 |
| | |||||
* | ordering can change depending on ruby version, so parse the JSON and verify ↵ | Aaron Patterson | 2011-01-17 | 1 | -3/+10 |
| | | | | data structure equality | ||||
* | Complex struct encoding test | Alexey Nayden | 2011-01-15 | 1 | -0/+23 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Fixed various isolated test missing requires within AS. | Josh Kalderimis | 2011-01-12 | 1 | -0/+1 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | fixed some issues with JSON encoding | Jakub Suder | 2010-09-07 | 1 | -1/+64 |
| | | | | | | | | | | | - 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> | ||||
* | Removes unused vars | Santiago Pastorino | 2010-07-24 | 1 | -1/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Time has it own implementation of xmlschema, now AMo doesn't depend on TZInfo | Santiago Pastorino | 2010-07-02 | 1 | -2/+4 |
| | | | | | | [#4979 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | BigDecimal#as_json does not really specify the F format, it delegates that ↵ | Xavier Noria | 2010-05-03 | 1 | -1/+3 |
| | | | | to whatever BigDecimal#to_s default format is, do the same in its test | ||||
* | Fix BigDecimal JSON encoding test. [#4495 state:resolved] | Cezary Baginski | 2010-04-28 | 1 | -3/+3 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | JSON: encode objects that don't have a native JSON representation using ↵ | Jeremy Kemper | 2010-04-26 | 1 | -2/+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. | ||||
* | Fix a JSON ordering issue | Yehuda Katz | 2010-02-10 | 1 | -3/+7 |
| | |||||
* | Automatically prefer Yajl or JSON backend over Yaml, if available | Jeremy Kemper | 2010-02-05 | 1 | -1/+1 |
| | |||||
* | Add yajl-ruby as a JSON parsing backend | Brian Lopez | 2010-02-05 | 1 | -0/+1 |
| | | | | | | [#2666 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix ActiveSupport::JSON encoding of control characters [\x00-\x1f] | Dwayne Litzenberger | 2009-12-23 | 1 | -1/+3 |
| | | | | | | | | | | | | | | 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 | -0/+1 |
| | |||||
* | Clean up spurious JSON decoding test failure | Jeremy Kemper | 2009-09-13 | 1 | -8/+2 |
| | |||||
* | Fix that JSON parser fails to read escaped backslashes. | Daniel Sheppard | 2009-08-09 | 1 | -3/+5 |
| | | | | | | [#973 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fixed a bug in JSON decoding with Yaml backend, where a combination of ↵ | Bas Van Klinkenberg | 2009-08-08 | 1 | -1/+7 |
| | | | | | | dates, escaped or unicode encoded data and arrays would make the parser fail with a ParseError exception. [#2831 state:resolved] Signed-off-by: Yehuda Katz <wycats@gmail.com> | ||||
* | JSON.escape returns UTF-8 strings | Jeremy Kemper | 2009-07-01 | 1 | -2/+7 |
| | | | | [#2849 state:resolved] | ||||
* | JSON: split encoding and coercion | Jeremy Kemper | 2009-06-08 | 1 | -7/+12 |
| | |||||
* | load the JSON Backend lazily. If the JSON gem is already loaded, use the ↵ | rick | 2009-05-17 | 1 | -0/+3 |
| | | | | JSONGem backend by default. | ||||
* | Privatize rails_to_json | Jeremy Kemper | 2009-04-26 | 1 | -1/+1 |
| | |||||
* | * Add pluggable JSON backends with support for the JSON gem. [rick] | rick | 2009-04-23 | 2 | -44/+70 |
| | | | | | | | | | | | | | | 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 | ||||
* | Opt in to JSON | Jeremy Kemper | 2009-04-22 | 1 | -0/+1 |
| | |||||
* | stdlib autoloads were hanging on 1.9.1 | Jeremy Kemper | 2009-04-22 | 1 | -2/+2 |
| | |||||
* | Explicit test dependencies | Jeremy Kemper | 2009-03-28 | 1 | -0/+1 |
| | |||||
* | Reverted affe50105f7027a44eb6e9cfb56f5b3fc070b19b and added more JSON ↵ | Ubiratan Pires Alberton | 2009-03-11 | 1 | -1/+3 |
| | | | | | | | | | | decoding tests. Works on Ruby 1.8 and 1.9 [#1100 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Properly decode \u escape sequences in JSON [#1100 state:resolved] [Tim ↵ | Tim Pope | 2009-03-10 | 1 | -1/+3 |
| | | | | | | Pope, Philip Hallstrom] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ruby 1.9 compat: rename deprecated assert_raises to assert_raise. | Jeremy Kemper | 2009-03-08 | 2 | -2/+2 |
| | | | | [#1617 state:resolved] | ||||
* | Ruby 1.9 compat: fix JSON decoding to work properly with multibyte values | Akira Matsuda | 2009-02-17 | 1 | -0/+3 |
| | | | | | | [#1969 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Properly quote json keys. | Michael Koziarski | 2009-01-16 | 1 | -2/+2 |
| | | | | | According to the RFC and the json.org site all json keys must be strings, and those strings must be quoted with double quotes. [#1755 state:committed] | ||||
* | Fix JSON decoder date-converter regexp [#1662 state:resolved] [Jonathan del ↵ | Pratik Naik | 2009-01-07 | 1 | -1/+2 |
| | | | | Strother] | ||||
* | Require mocha >= 0.9.0 for AS tests | Jeremy Kemper | 2008-11-22 | 1 | -10/+8 |
| | |||||
* | test nested hash with float | Dan Barry | 2008-10-12 | 1 | -0/+12 |
| | | | | | | [#652 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Move with_kcode helper to abstract_unit. Add tests for multibyte string ↵ | Manfred Stienstra | 2008-09-21 | 1 | -12/+0 |
| | | | | extensions. | ||||
* | Time#to_json: don't convert to utc before encoding. References #175 | gbuesing | 2008-05-18 | 1 | -0/+16 |
| | |||||
* | Add config.active_support.escape_html_entities_in_json to allow disabling of ↵ | Rick Olson | 2008-04-08 | 1 | -0/+3 |
| | | | | | | html entity escaping. [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Add config.active_support.use_standard_json_time_format setting so that ↵ | Rick Olson | 2008-04-01 | 1 | -3/+12 |
| | | | | | | Times and Dates export to ISO 8601 dates. [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Ruby 1.9 compat: declare utf-8 file encoding | Jeremy Kemper | 2008-02-02 | 1 | -0/+1 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | require abstract_unit directly since test is in load path | Jeremy Kemper | 2008-01-05 | 2 | -2/+2 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |