NETCONF vs RESTCONF Encoding Languages Support
Short answer
D NETCONF supports XML, and RESTCONF supports XML and JSON.
Question
Key Takeaways
The main trap is assuming RESTCONF is limited to JSON like many modern APIs; remember it retains full XML compatibility alongside JSON.
Compare NETCONF and RESTCONF encoding capabilities. NETCONF relies exclusively on XML, while RESTCONF supports both XML and JSON for flexible data interchange.
Common mistake: Choosing B is a common mistake because RESTCONF is often associated with JSON due to its HTTP nature, but forgetting that it also fully supports XML leads to an incomplete answer.
Expert Analysis
The question asks for the encoding languages supported by NETCONF compared to RESTCONF. This requires understanding the standard data formats defined in their respective RFCs.
NETCONF (RFC 6241) is designed around XML. It uses XML for both the protocol message encapsulation and the configuration data models. While extensions exist, the core protocol strictly mandates XML. Therefore, NETCONF supports XML only.
RESTCONF (RFC 8040) is an HTTP-based interface that leverages YANG models but allows for more flexibility in representation. It explicitly supports both XML and JSON as media types for request and response bodies. This aligns with modern web API standards where JSON is often preferred for lightweight exchanges.
Let's evaluate the options:
- A: Incorrect. NETCONF does not support JSON natively; RESTCONF supports both.
- B: Incorrect. While it correctly states NETCONF uses XML, it implies RESTCONF only supports JSON, ignoring its XML capability.
- C: Incorrect. NETCONF does not support JSON.
- D: Correct. NETCONF supports XML, and RESTCONF supports both XML and JSON. This accurately reflects the standards.
The key distinction is NETCONF's strict XML reliance versus RESTCONF's dual support for XML and JSON, offering greater interoperability with web-centric tools.
Official Reference
These links open the official vendor documentation in a new tab.
Exam Strategy
When comparing network management protocols, always check the underlying RFC specifications for data format constraints. For automation questions, distinguish between legacy text-based protocols (like SNMPv2c or early NETCONF) and modern RESTful interfaces. Remember that RESTCONF was designed to be more web-friendly than NETCONF, hence the addition of JSON support while retaining XML backward compatibility.
Frequently Asked Questions
Why does NETCONF only support XML?
Can I use JSON with NETCONF?
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
G_Singh12 👍 1 Answered D• NETCONF (Network Configuration Protocol - RFC 6241): Uses strictly XML for encapsulating both protocol messages and configuration data. It does not natively support JSON formatting within its standard protocol operations. • RESTCONF (RFC 8040): Designed as a lighter, HTTP-based alternative to NETCONF that aligns with web development standards. It inherently supports both XML and JSON formatting, allowing network automation scripts to request and send data in either language by setting appropriate headers (e.g., Content-Type: application/yang-data+json or application/yang-data+xml).
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All 300-420 Questions
Access 150 questions with complete answers and detailed explanations.
View Full 300-420 Practice Test →