Skip to content

Commit 7dcd9a8

Browse files
committed
add pretty printing to json encoding options. Makes the openapi docs much easier to read
1 parent 309c7cf commit 7dcd9a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/CanJsonSerialise.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ trait CanJsonSerialise
2020
*/
2121
public function jsonSerialize() : string
2222
{
23-
return json_encode($this->toArray(), JSON_UNESCAPED_SLASHES);
23+
return json_encode($this->toArray(), JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
2424
}
2525
}

0 commit comments

Comments
 (0)