module ActiveResource::Formats::JsonFormat

Public Instance Methods

decode(json) click to toggle source
# File lib/spiffy_stores_api/json_format.rb, line 7
def decode(json)
  data = ActiveSupport::JSON.decode(json)
  if data.is_a?(Hash) && data.keys.size == 1
    data.values.first
  else
    data
  end
end