Sha256: df31f79cfeafe9019b50b5d5f1439235e3c9cdd2c201e96fca8ace90c2a12a8a
Contents?: true
Size: 399 Bytes
Versions: 16
Compression:
Stored size: 399 Bytes
Contents
require 'restful/serializers/base' require 'yajl' # # AR params hash. # module Restful module Serializers class JsonSerializer < Base serializer_name :json def serialize(resource, options = {}) hasher = Restful::Serializers::HashSerializer.new hash = hasher.serialize(resource, options) Yajl::Encoder.encode(hash) end end end end
Version data entries
16 entries across 16 versions & 2 rubygems