Skip to content

Commit 246810d

Browse files
committed
Use json_validate
1 parent 9365995 commit 246810d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Validator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ public static function json(string $field, array $data) : bool
174174
if ($data === null) {
175175
return false;
176176
}
177-
\json_decode($data);
178-
return \json_last_error() === \JSON_ERROR_NONE;
177+
return \json_validate($data);
179178
}
180179

181180
/**

0 commit comments

Comments
 (0)