Namespace
Methods
B
D
E
P
W
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

CircularReferenceError = Deprecation::DeprecatedConstantProxy.new('ActiveSupport::JSON::CircularReferenceError', Encoding::CircularReferenceError)
 
Class Public methods
backend()
backend=(name)
decode(json, options ={})
# File activesupport/lib/active_support/json/decoding.rb, line 11
def decode(json, options ={})
  data = MultiJson.decode(json, options)
  if ActiveSupport.parse_json_times
    convert_dates_from(data)
  else
    data
  end
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
def self.encode(value, options = nil)
  Encoding::Encoder.new(options).encode(value)
end
engine()
Also aliased as: backend
# File activesupport/lib/active_support/json/decoding.rb, line 20
def engine
  MultiJson.engine
end
engine=(name)
Also aliased as: backend=
# File activesupport/lib/active_support/json/decoding.rb, line 25
def engine=(name)
  MultiJson.engine = name
end
parse_error()
# File activesupport/lib/active_support/json/decoding.rb, line 37
def parse_error
  MultiJson::DecodeError
end
with_backend(name)
# File activesupport/lib/active_support/json/decoding.rb, line 30
def with_backend(name)
  old_backend, self.backend = backend, name
  yield
ensure
  self.backend = old_backend
end