JNCIA-DevOps Data Serialization Practice Question
An automation engineer needs to pretty-print a JSON payload in the Linux terminal for debugging Junos telemetry. Which built-in Python command-line utility can be invoked to validate and pretty-print a JSON file?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
python3 -m json.tool filename.json
Python provides a command-line JSON tool via the json.tool module, invoked as 'python3 -m json.tool filename.json'.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
python3 -m yaml.format filename.json
Why it's wrong here
Incorrect. yaml.format is not a standard module.
- ✗
python3 -c 'import json; json.format()'
Why it's wrong here
Incorrect. json.format does not exist.
- ✓
python3 -m json.tool filename.json
Why this is correct
Correct. python3 -m json.tool validates and pretty-prints JSON files.
- ✗
netconf-console --pretty filename.json
Why it's wrong here
Incorrect. netconf-console does not format arbitrary JSON files.
About these practice questions
Courseiva writes every JNCIA-DevOps question from scratch — 306 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official Juniper Networks exam blueprint
This JNCIA-DevOps practice question is part of Courseiva's free Juniper Networks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the JNCIA-DevOps exam.