Sha256: 93f3bc4cbce2f8a0aa70c6c2191ef5242d4e3a4b289d9350ce046e99ad3b2f87

Contents?: true

Size: 353 Bytes

Versions: 6

Compression:

Stored size: 353 Bytes

Contents

require 'yajl'

module Animoto
  class ResponseParser
    class YajlAdapter < Animoto::ResponseParser
      
      @format = 'json'
      
      def parse body
        ::Yajl::Parser.parse body
      end
      
      def unparse hash
        ::Yajl::Encoder.encode hash
      end
      
    end
    
    adapter_map.merge! :yajl => YajlAdapter
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
animoto-0.0.0.alpha9 ./lib/animoto/response_parsers/yajl_adapter.rb
animoto-0.0.0.alpha8 ./lib/animoto/response_parsers/yajl_adapter.rb
animoto-0.0.0.alpha7 ./lib/animoto/response_parsers/yajl_adapter.rb
animoto-0.0.0.alpha6 ./lib/animoto/response_parsers/yajl_adapter.rb
animoto-0.0.0.alpha5 ./lib/animoto/response_parsers/yajl_adapter.rb
animoto-0.0.0.alpha4 ./lib/animoto/response_parsers/yajl_adapter.rb