Base
class for serializing and deserializing custom objects.
Example:
class MoneySerializer < ActiveJob::Serializers::ObjectSerializer def serialize(money) super("amount" => money.amount, "currency" => money.currency) end def deserialize(hash) Money.new(hash["amount"], hash["currency"]) end def klass Money end end
Methods
- D
- N
- S
Included Modules
Class Public methods
new() Link
Instance Public methods
deserialize(hash) Link
Deserializes an argument from a JSON primitive type.
serialize(hash) Link
Serializes an argument to a JSON primitive type.