Custom Serialization

    Dapr uses JSON serialization and thus (complex) type information is lost when sending/receiving data.

    This works for any type that we have full ownership over, however, it doesn’t work for classes from libraries or PHP itself. For that, you need to register a custom serializer with the DI container:

    1. <?php
    2. // in config.php
    3. {
    4. public function serialize(mixed $value,\Dapr\Serialization\ISerializer $serializer) : mixed
    5. {
    6. }
    7. return [

    Deserialization