JNCIA-DevOps Data Serialization Practice Question
When serializing complex nested Python dictionaries to JSON, which THREE data types will cause a TypeError unless handled by a custom default encoder function? (Choose three)
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
✓
Python set objects
Standard json.dumps() cannot serialize sets, complex numbers, or custom class instances without custom encoder logic.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Standard string objects
Why it's wrong here
Incorrect. Strings are natively serializable.
- ✓
Python set objects
Why this is correct
Correct. Sets are not JSON serializable by default.
- ✓
Custom class instances
Why this is correct
Correct. User-defined classes require a default serialization handler.
- ✗
Boolean values
Why it's wrong here
Incorrect. Booleans are natively serializable.
- ✓
Complex numbers
Why this is correct
Correct. Complex numbers have no native JSON representation.
About these practice questions
One of 306 original JNCIA-DevOps practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.