Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
An interface defines the public facing interaction of an item. It does not define any implementation details about the inner workings of those interactions. By implementing an interface, we agree to implement the methods described in the contract of the interface.
Course: File Handling with PHP - JSON
Documentation for JavaScript Object Notation
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.
The decoding in PHP 5 is handled by a parser based on the JSON_checker by Douglas Crockford. PHP 7 comes with a completely new and improved parser that is specifically written for PHP and licensed under the PHP license. Either version uses the following functions:
json_encode - Returns a string containing the JSON representation of the supplied value.
json_decode - Takes a JSON encoded string and converts it into a PHP variable.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Alexei Parphyonov
34,128 Points0 Answers
-
Mister Moody
48,333 Points2 Answers
-
Alex Bauer
9,426 Points2 Answers
-
Yotsaphon Sutweha
2,621 Points2 Answers
-
Unsubscribed User
9,496 Points2 Answers
-
Ray Knag
8,110 PointsNULL Result, not sure what to adjust in my code of if this is a database.json issue
Posted by Ray KnagRay Knag
8,110 Points1 Answer
-
Ashikur Rahman
361 PointsFatal error: Interface 'RepositoryInterface' not found in /home/treehouse/workspace/src/classes/jsonRepository.php on
Posted by Ashikur RahmanAshikur Rahman
361 Points1 Answer
-
Don Macarthur
28,430 Points2 Answers
-
Mikkel Rasmussen
31,772 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up