~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/activeresource/lib/active_resource/formats/json_format.rb

  • Committer: Richard Lee (Canonical)
  • Date: 2010-10-15 15:17:58 UTC
  • mfrom: (190.1.3 use-case-mapper)
  • Revision ID: richard.lee@canonical.com-20101015151758-wcvmfxrexsongf9d
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
module ActiveResource
2
 
  module Formats
3
 
    module JsonFormat
4
 
      extend self
5
 
 
6
 
      def extension
7
 
        "json"
8
 
      end
9
 
 
10
 
      def mime_type
11
 
        "application/json"
12
 
      end
13
 
 
14
 
      def encode(hash, options = nil)
15
 
        ActiveSupport::JSON.encode(hash, options)
16
 
      end
17
 
 
18
 
      def decode(json)
19
 
        ActiveSupport::JSON.decode(json)
20
 
      end
21
 
    end
22
 
  end
23
 
end