1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/you-can-make-php-throw-an-exception-when-decoding-json-if-the-value-isnt-valid-json.md
2021-10-29 21:16:27 +02:00

11 lines
No EOL
521 B
Markdown

---
title: 'You can make PHP throw an exception when decoding JSON if the value isn''t valid JSON'
tweet_id: '1454133803056775178'
thread_slug: weekly-thread-2021-43
author_username: SteveTheBauman
images:
- 'https://pbs.twimg.com/media/FCuqk2zWQAsk08o.jpg'
created_at: 2021-10-29T17:11:29+00:00
slug: you-can-make-php-throw-an-exception-when-decoding-json-if-the-value-isnt-valid-json
---
Had no idea you could have PHP throw a built-in exception when decoding JSON -- I've always done this manually until today 😭