code: public function decode($data)
      {
          $decodedData = json_decode($data, true);
  
          // fallback for old storage that uses PHP serialize format
          if (is_null($decodedData) && $data) {
              $decodedData = unserialize($data);
          }
  
          if (is_array($decodedData)) {
              foreach ($decodedData as $key => &$value) {
                  if (is_array($value)) {
                      $timeLine = new QtiTimeLine();
                      $timeLine->fromArray($value);
                      $decodedData[$key] = $timeLine;
                  }
              }
          }
  
          return $decodedData;
      }
docs: Decode a string encoded with the managed format.
  @param string $data
  @return mixed