Sha256: c3e3d223b169a46d0de944588aac3bc2fee524ffcbac82d20546d04793e7c095

Contents?: true

Size: 432 Bytes

Versions: 3

Compression:

Stored size: 432 Bytes

Contents

require 'yajl'

module Animoto
  module ResponseParsers
    class YajlAdapter < Animoto::ResponseParsers::Base
      
      @format = 'json'
      
      # @return [Hash<String,Object>]
      def parse string
        ::Yajl::Parser.parse string
      end
      
      # @return [String]
      def unparse object
        ::Yajl::Encoder.encode object
      end      
    end
    
    adapter_map.merge! :yajl => YajlAdapter
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
animoto-0.1.1.beta1 ./lib/animoto/response_parsers/yajl_adapter.rb
animoto-0.1.0.beta1 ./lib/animoto/response_parsers/yajl_adapter.rb
animoto-0.1.0.beta0 ./lib/animoto/response_parsers/yajl_adapter.rb