Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | removed AS backends and instead rely on MultiJson for json decoding | Josh Kalderimis | 2011-04-18 | 4 | -227/+33 | |
|/ | ||||||
* | parse dates to yaml in json arrays | Diego Carrion | 2011-03-22 | 1 | -2/+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 | -3/+5 | |
| | | | | | | 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 | -1/+1 | |
| | | | | | | 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 | 3 | -3/+21 | |
| | | | | | | 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 JSON decoding of newline character with Yaml backend [#3479 state:resolved] | Maxime RETY | 2011-02-02 | 1 | -2/+6 | |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | |||||
* | use ! " " YAML string literal syntax rather than removing both quotes | Aaron Patterson | 2011-01-21 | 1 | -4/+4 | |
| | ||||||
* | Complex struct encoding fix | Alexey Nayden | 2011-01-15 | 1 | -0/+6 | |
| | | | | | | [#6077 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | |||||
* | add Psych::SyntaxError to the list of rescued YAML exceptions | Aaron Patterson | 2011-01-04 | 1 | -1/+8 | |
| | ||||||
* | 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> | |||||
* | Removes unused vars | Santiago Pastorino | 2010-07-24 | 1 | -1/+1 | |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | 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 | 2 | -35/+8 | |
| | | | | 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] | |||||
* | Fix Yajl backend discovery in ActiveSupport::JSON | Maxime RETY | 2010-06-18 | 1 | -1/+1 | |
| | | | | | | [#4897 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | removes spurious .rb in require | Santiago Pastorino | 2010-06-13 | 1 | -1/+1 | |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | 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. | |||||
* | Disprefer JSONGem decoder since it only decodes JSON objects | Jeremy Kemper | 2010-03-09 | 1 | -1/+1 | |
| | ||||||
* | Automatically prefer Yajl or JSON backend over Yaml, if available | Jeremy Kemper | 2010-02-05 | 1 | -1/+16 | |
| | ||||||
* | Add yajl-ruby as a JSON parsing backend | Brian Lopez | 2010-02-05 | 1 | -0/+40 | |
| | | | | | | [#2666 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | 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 | |
| | ||||||
* | Ruby 1.9.2: work around changes to flatten and nil.to_str | Jeremy Kemper | 2009-11-08 | 1 | -9/+12 | |
| | ||||||
* | Clarify date/time dependencies | Jeremy Kemper | 2009-11-02 | 1 | -3/+0 | |
| | ||||||
* | Clean up spurious JSON decoding test failure | Jeremy Kemper | 2009-09-13 | 3 | -8/+5 | |
| | ||||||
* | Fix that JSON parser fails to read escaped backslashes. | Daniel Sheppard | 2009-08-09 | 1 | -1/+4 | |
| | | | | | | [#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 | -7/+10 | |
| | | | | | | 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 | -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 | 2 | -0/+6 | |
| | ||||||
* | Simplify json decoder backend lazy load | Jeremy Kemper | 2009-06-08 | 1 | -4/+2 | |
| | ||||||
* | Ruby 1.9: fix json encoding | Jeremy Kemper | 2009-06-08 | 1 | -1/+2 | |
| | ||||||
* | JSON: split encoding and coercion | Jeremy Kemper | 2009-06-08 | 15 | -211/+240 | |
| | ||||||
* | load the JSON Backend lazily. If the JSON gem is already loaded, use the ↵ | rick | 2009-05-17 | 2 | -2/+6 | |
| | | | | JSONGem backend by default. | |||||
* | Add support for parsing XML and JSON from an IO as well as a string [#2659 ↵ | Brian Lopez | 2009-05-17 | 2 | -2/+8 | |
| | | | | | | state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com> | |||||
* | 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 | 15 | -25/+26 | |
| | | | | reference stack instead of sticking it in the options hash | |||||
* | Privatize rails_to_json | Jeremy Kemper | 2009-04-26 | 14 | -134/+150 | |
| | ||||||
* | Extract json string escaping | Jeremy Kemper | 2009-04-26 | 1 | -32/+1 | |
| | ||||||
* | Only Object to_json alias is needed. Prefer nil options. | Jeremy Kemper | 2009-04-26 | 14 | -33/+12 | |
| | ||||||
* | 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 | 18 | -100/+163 | |
| | | | | | | | | | | | | | | 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 |