A script sends a JSON body to a Catalyst 9800 NETCONF session and the edit is rejected. What is the mismatch?
Select an answer to reveal the explanation.
Short Explanation
You sent JSON to a session that speaks XML, so the edit was rejected. NETCONF on this controller expects an XML document; use JSON with a different interface. You can keep the session and change the document format.
Full Explanation
NETCONF operations use XML, typically over SSH, so a JSON body is the wrong document for this session and the edit is rejected. NETCONF does not carry JSON as its operation format. The claim that NETCONF carries JSON and would reject XML reverses the format: XML is the expected document. YANG is the data model, not a JSON port; an SSH session can accept an edit when the document matches the model. A get does not require JSON either, so the claim that every NETCONF get needs a JSON body is also incorrect. The script is sending JSON to the NETCONF interface. Exam caveat: RESTCONF commonly uses HTTPS and can use JSON or XML, so send a JSON client to RESTCONF or send XML on the NETCONF session; do not mix the interfaces. Practical check: submit the same change as XML on the NETCONF session, or send the JSON body to RESTCONF, and confirm that one is accepted. After the change, check one live client and confirm the expected result before changing anything else; on the next attempt, confirm the symptom before making another change.