private static function getSerializer(): Serializer
    {
        if (static::$serializer === null) {
            $extractor          = new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]);
            static::$serializer = new Serializer(
                [new ObjectNormalizer(null, null, null, $extractor)],
                [new JsonEncoder()]
            );
        }
        return static::$serializer;
    }