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
decode(json, options ={})
    # 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
encode(value, options = nil)

Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.

    # File activesupport/lib/active_support/json/encoding.rb, line 30
30:     def self.encode(value, options = nil)
31:       Encoding::Encoder.new(options).encode(value)
32:     end
engine()
    # File activesupport/lib/active_support/json/decoding.rb, line 26
26:       def engine
27:         if MultiJson.respond_to?(:adapter)
28:           MultiJson.adapter
29:         else
30:           MultiJson.engine
31:         end
32:       end
engine=(name)
    # File activesupport/lib/active_support/json/decoding.rb, line 35
35:       def engine=(name)
36:         if MultiJson.respond_to?(:use)
37:           MultiJson.use name
38:         else
39:           MultiJson.engine = name
40:         end
41:       end
parse_error()
    # File activesupport/lib/active_support/json/decoding.rb, line 51
51:       def parse_error
52:         MultiJson::DecodeError
53:       end
with_backend(name)
    # File activesupport/lib/active_support/json/decoding.rb, line 44
44:       def with_backend(name)
45:         old_backend, self.backend = backend, name
46:         yield
47:       ensure
48:         self.backend = old_backend
49:       end