Froze rails gems
[depot.git] / vendor / rails / activeresource / lib / active_resource / formats / json_format.rb
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={})
15 hash.to_json(options)
16 end
17
18 def decode(json)
19 ActiveSupport::JSON.decode(json)
20 end
21 end
22 end
23 end