swaggest / json-diff

JSON diff/rearrange/patch/pointer library for PHP
MIT License
220 stars 30 forks source link

Add option for exclute test operation #58

Open okrimsoft opened 2 years ago

okrimsoft commented 2 years ago

Could be usefull add ability to disable test operation in JsonDiff some node classes like fast-json-patch work also without and in websocket comunication can reduce traffic with large amount of change

if ($this->jsonPatch !== null) {
    if ( ! self::SKIP_TEST_ENTRIES ) {
        $this->jsonPatch->op(new Test($this->path, $original));
    }
    $this->jsonPatch->op(new Replace($this->path, $new));
}