Class Index [+]

Quicksearch

ActiveSupport::JSON

Constants

DATE_REGEX

matches YAML-formatted dates

CircularReferenceError
DECODERS

Listed in order of preference.

Attributes

parse_error[R]

Public Class Methods

backend() click to toggle source
    # File lib/active_support/json/decoding.rb, line 16
16:       def backend
17:         set_default_backend unless defined?(@backend)
18:         @backend
19:       end
backend=(name) click to toggle source
    # File lib/active_support/json/decoding.rb, line 21
21:       def backend=(name)
22:         if name.is_a?(Module)
23:           @backend = name
24:         else
25:           require "active_support/json/backends/#{name.to_s.downcase}"
26:           @backend = ActiveSupport::JSON::Backends::const_get(name)
27:         end
28:         @parse_error = @backend::ParseError
29:       end
encode(value, options = nil) click to toggle source

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

    # File lib/active_support/json/encoding.rb, line 29
29:     def self.encode(value, options = nil)
30:       Encoding::Encoder.new(options).encode(value)
31:     end
set_default_backend() click to toggle source
    # File lib/active_support/json/decoding.rb, line 38
38:       def set_default_backend
39:         DECODERS.find do |name|
40:           begin
41:             self.backend = name
42:             true
43:           rescue LoadError
44:             # Try next decoder.
45:             false
46:           end
47:         end
48:       end
with_backend(name) click to toggle source
    # File lib/active_support/json/decoding.rb, line 31
31:       def with_backend(name)
32:         old_backend, self.backend = backend, name
33:         yield
34:       ensure
35:         self.backend = old_backend
36:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.