Skip to content

Commit 5761e57

Browse files
authored
Address implements JsonSerializable
1 parent b60f0db commit 5761e57

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Model/Address.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author Api Postcode <info@api-postcode.nl>
1515
*/
16-
class Address
16+
class Address implements \JsonSerializable
1717
{
1818
/** @var string */
1919
private $street;
@@ -125,4 +125,12 @@ public function toArray()
125125
'latitude' => $this->latitude,
126126
);
127127
}
128+
129+
/**
130+
* {@inheritdoc}
131+
*/
132+
function jsonSerialize()
133+
{
134+
return $this->toArray();
135+
}
128136
}

0 commit comments

Comments
 (0)