Skip to content

Commit cb96bab

Browse files
committed
Allow derivatives of Json to be passed as Json parameters
1 parent fe8859f commit cb96bab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Json.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ private function translateJson(): void
11071107
public function setJson(string|object|array $json): self
11081108
{
11091109
$this->json = match (true) {
1110-
$json instanceof $this => $json->getArray(),
1110+
$json instanceof $this, $json instanceof Json => $json->getArray(),
11111111
$json instanceof File => $this->convertJsonToArray($json->getContentAsText()),
11121112
is_string($json) => $this->convertJsonToArray($json),
11131113
is_array($json) => $json,

0 commit comments

Comments
 (0)