We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd38b50 commit d842546Copy full SHA for d842546
src/Renderer/Html/Json.php
@@ -26,12 +26,26 @@ final class Json extends AbstractHtml
26
*/
27
public function render(): string
28
{
29
+ $changes = $this->getChanges();
30
+
31
+ if (empty($changes)) {
32
+ return self::getIdenticalResult();
33
+ }
34
35
return \json_encode(
- $this->getChanges(),
36
+ $changes,
37
\JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES
38
);
39
}
40
41
+ /**
42
+ * {@inheritdoc}
43
+ */
44
+ public static function getIdenticalResult(): string
45
+ {
46
+ return '[]';
47
48
49
/**
50
* {@inheritdoc}
51
0 commit comments