Parse JSON in PHP | How to validate and process nested JSON data

Опубликовано: 19 Февраль 2024
на канале: Dave Hollingworth
2,413
168

Learn what JSON is, and how to process it in PHP.
Please consider supporting my channel: ☕ https://ko-fi.com/davehollingworth

Topics covered:
• JSON
• Parsing and validating JSON data in PHP
• Nested JSON data

All source code shown is free to download:
‣ https://gist.github.com/daveh/4aef691...

Links shown in the video:
‣ https://www.php.net/manual/en/functio...
‣ https://www.php.net/manual/en/functio...

Videos:
‣ How to call APIs from PHP:
   • How to call APIs from PHP: file_get_c...  
‣ How to use a REST API from PHP using cURL:
   • How to use a REST API from PHP using ...  

00:00 Introduction
00:14 JSON overview
01:37 Validating JSON
01:49 Sample JSON data
02:44 Decoding JSON in PHP
03:41 Handling invalid JSON
04:25 JSON parsing errors
05:54 JSON exceptions
07:19 Handling nested data
09:00 JSON objects as PHP arrays
10:36 Format JSON with HTML example
12:04 Summary

#PHP #json #project