Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
13.9.2. JSON Files
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
5 cards from this lesson. Good the night before a test.
Try these first
- 1.
What does JSON stand for?
Hint
Think about the name and its relation to JavaScript.
- 2.
How do you read a JSON file in Python?
Hint
Remember the syntax for file handling in Python.
- 3.
What does JSON stand for?
- JavaScript Object Notation
- Java Standard Object Notation
- JSON programming shorthand
Hint
Think of its origins.
- 4.
True or False: JSON only supports text data.
- True
- False
Hint
Consider the versatility of JSON.
- 5.
Create a complete C++ application that reads a JSON file, modifies one of its values, and then writes it back out.
Hint
Remember to check for file existence before reading or writing!
- 6.
Write a Python function that accepts a filename and a key and returns the value associated with that key from the JSON file.
Hint
Don't forget error handling for missing keys!
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
3 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
2 more questions available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting