example:
class ToISO8601
def self.call(obj)
obj.iso8601
end
end
# or ToISO8601 = ->(obj) { obj.iso8601 }
class PostSerializer
include JSONAPI::Serializer
attribute :created_at, ToISO8601
attribute :updated_at, ToISO8601
# or by lambda
# attribute :updated_at, ->(obj) { obj.iso8601 }
end