Drag and drop the code snippets from the bottom onto blanks in the Python script so that the program changes the IP address and saves it as a new JSON file on the disk. Not all options are used.
given answer is correct
The script reads a JSON file, modifies an IP address within the JSON structure, and then saves the modified JSON in both compact and indented formats into two separate files.
This is what I can gather
1. Open some file which contains json data.
2. Read that entire file into a string (json.read)
3. Converts the json string into a python dictionary array (json.load)
4. Modify the IP address of Gi0 to 192.168.1.2 in the python dictionary array
5. Convert the python dictionary array into back to a json string without identation (json.dump)
6 Convert the python dictionary array into back to a json string with indentation (json.dump)
7. Write the json string with and without identation to 2 seperate files (json.write)
So I think the provided answer is correct.
This section is not available anymore. Please use the main Exam Page.350-401 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
[Removed]
Highly Voted 1 year ago[Removed]
Most Recent 7 months, 1 week agochiacche
8 months, 3 weeks ago[Removed]
1 year agosheetal2019
1 year, 1 month agoDarthObiGuan
1 year, 1 month agoAzraelOmbrixa
1 year, 3 months ago5eba813
1 year, 3 months agocloud29
1 year, 3 months ago