Module ActiveSupport::JSON
In: vendor/rails/activesupport/lib/active_support/json/backends/jsongem.rb
vendor/rails/activesupport/lib/active_support/json/backends/yaml.rb
vendor/rails/activesupport/lib/active_support/json/encoding.rb
vendor/rails/activesupport/lib/active_support/json/decoding.rb
vendor/rails/activesupport/lib/active_support/json/variable.rb

Methods

Classes and Modules

Module ActiveSupport::JSON::Backends
Class ActiveSupport::JSON::Variable

Constants

DATE_REGEX = /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[ \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?))$/   matches YAML-formatted dates
CircularReferenceError = Deprecation::DeprecatedConstantProxy.new('ActiveSupport::JSON::CircularReferenceError', Encoding::CircularReferenceError)

Attributes

parse_error  [R] 

Public Class methods

[Source]

    # File vendor/rails/activesupport/lib/active_support/json/decoding.rb, line 12
12:       def backend
13:         self.backend = "Yaml" unless defined?(@backend)
14:         @backend
15:       end

[Source]

    # File vendor/rails/activesupport/lib/active_support/json/decoding.rb, line 17
17:       def backend=(name)
18:         if name.is_a?(Module)
19:           @backend = name
20:         else
21:           require "active_support/json/backends/#{name.to_s.downcase}.rb"
22:           @backend = ActiveSupport::JSON::Backends::const_get(name)
23:         end
24:         @parse_error = @backend::ParseError
25:       end

[Source]

    # File vendor/rails/activesupport/lib/active_support/json/decoding.rb, line 27
27:       def with_backend(name)
28:         old_backend, self.backend = backend, name
29:         yield
30:       ensure
31:         self.backend = old_backend
32:       end

[Validate]