Methods
- D
- E
- P
- W
Classes and Modules
Constants
DATE_REGEX | = | /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?))$/ |
matches YAML-formatted dates |
Class Public methods
# File activesupport/lib/active_support/json/decoding.rb, line 11 11: def decode(json, options ={}) 12: # Can't reliably detect whether MultiJson responds to load, since it's 13: # a reserved word. Use adapter as a proxy for new features. 14: data = if MultiJson.respond_to?(:adapter) 15: MultiJson.load(json, options) 16: else 17: MultiJson.decode(json, options) 18: end 19: if ActiveSupport.parse_json_times 20: convert_dates_from(data) 21: else 22: data 23: end 24: end
Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.