Class/Module Index [+]

Quicksearch

ActiveSupport::JSON

Constants

CircularReferenceError
DATE_REGEX

matches YAML-formatted dates

Public Class Methods

backend() click to toggle source
Alias for: engine
backend=(name) click to toggle source
Alias for: engine=
decode(json, options ={}) click to toggle source
# File 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) 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 30
def self.encode(value, options = nil)
  Encoding::Encoder.new(options).encode(value)
end
engine() click to toggle source
# File lib/active_support/json/decoding.rb, line 20
def engine
  MultiJson.engine
end
Also aliased as: backend
engine=(name) click to toggle source
# File lib/active_support/json/decoding.rb, line 25
def engine=(name)
  MultiJson.engine = name
end
Also aliased as: backend=
parse_error() click to toggle source
# File lib/active_support/json/decoding.rb, line 37
def parse_error
  MultiJson::DecodeError
end
with_backend(name) click to toggle source
# File 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.