forked from CuyZ/Valinor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: catch
json_encode
exception to help identifying parsing errors
This brings two improvements: - The reason for the JSON parsing failure is visible in the stack trace / `$previous` exception, allowing the developer to determine whether the parsing failure was caused by a syntax error, invalid UTF-8 sequence or something else. - The JSON string null (which decodes to null) is no longer erroneously rejected as invalid. Instead it is rejected, because it is not iterable, slightly improving the error reporting.
- Loading branch information
Showing
3 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters