protected function createJsonApi($source, DocumentHydrator $hydrator): JsonApiObject
    {
        $jsonApi = isset($source->version)
            ? new JsonApiObject($source->version)
            : new JsonApiObject();

        $hydrator->hydrateObject($jsonApi, $source);

        return $jsonApi;
    }