private function dumpArray(array &$value, $name): void
  {
    list($id, $ref) = $this->isReference($value);

    if ($ref===null)
    {
      $this->writer->writeArrayOpen($id, $name);

      foreach ($value as $key => &$item)
      {
        $this->recursiveDump($item, $key);
      }

      $this->writer->writeArrayClose($id, $name);
    }
    else
    {
      $this->writer->writeArrayReference($ref, $name);
    }
  }