class ActiveJob::Serializers::ObjectSerializer

end
end
Money
def klass<br><br>private<br><br>end<br>Money.new(hash, hash)
def deserialize(hash)
end
super(“amount” => money.amount, “currency” => money.currency)
def serialize(money)
class MoneySerializer < ActiveJob::Serializers::ObjectSerializer
Example:
Base class for serializing and deserializing custom objects.

def deserialize(json)

Deserializes an argument from a JSON primitive type.
def deserialize(json)
  raise NotImplementedError
end

def klass # :doc:

:doc:
The class of the object that will be serialized.
def klass # :doc:
  raise NotImplementedError
end

def serialize(hash)

Serializes an argument to a JSON primitive type.
def serialize(hash)
  { Arguments::OBJECT_SERIALIZER_KEY => self.class.name }.merge!(hash)
end

def serialize?(argument)

Determines if an argument should be serialized by a serializer.
def serialize?(argument)
  argument.is_a?(klass)
end