Module: ActiveResource::Formats::JsonFormat

Extended by:
JsonFormat
Included in:
JsonFormat
Defined in:
activeresource/lib/active_resource/formats/json_format.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) decode(json)



18
19
20
# File 'activeresource/lib/active_resource/formats/json_format.rb', line 18

def decode(json)
  ActiveSupport::JSON.decode(json)
end

- (Object) encode(hash, options = nil)



14
15
16
# File 'activeresource/lib/active_resource/formats/json_format.rb', line 14

def encode(hash, options = nil)
  ActiveSupport::JSON.encode(hash, options)
end

- (Object) extension



6
7
8
# File 'activeresource/lib/active_resource/formats/json_format.rb', line 6

def extension
  "json"
end

- (Object) mime_type



10
11
12
# File 'activeresource/lib/active_resource/formats/json_format.rb', line 10

def mime_type
  "application/json"
end