You can check if a string contains JSON by decoding it, encoding it again, and comparing the value with the original
- ·
- Telegram
- ·
- Newsletter
🔥 A way to check if a string contains valid JSON: just decode it, encode it again, and check if it matches the original value #php