chg: [stix-export] Use JsonTool

pull/7851/head
Jakub Onderka 2021-10-17 15:05:22 +02:00
parent f481e30fe6
commit a6c5089eba
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<?php
App::uses('JSONConverterTool', 'Tools');
App::uses('TmpFileTool', 'Tools');
App::uses('JsonTool', 'Tools');
abstract class StixExport
{
@ -44,7 +45,7 @@ abstract class StixExport
}
$converter = new JSONConverterTool();
$event = json_encode($converter->convert($data, false, true)); // we don't need pretty printed JSON
$event = JsonTool::encode($converter->convert($data, false, true)); // we don't need pretty printed JSON
if ($this->__n_attributes + $attributesCount < $this->__attributes_limit) {
$this->__tmp_file->append($this->__n_attributes === 0 ? $event : ',' . $event);
$this->__n_attributes += $attributesCount;