A netops developer must push VLAN config via RESTCONF to IOS XE but keeps getting 400 errors from hand-built JSON. The team has the exact YANG models from the device and needs valid, namespaced payloads quickly. Which YANG Suite method builds a correct JSON instance?
Select an answer to reveal the explanation.
Short Explanation
You're done guessing at brackets — let the models do the work. That model-driven build checks your tree before you send a thing.
Full Explanation
The correct method uses the device’s exact YANG modules to build the intended configuration tree, validate it against the schema, and export a compliant JSON instance. That workflow catches structural and type errors before transmission and preserves the module-qualified member names required in RFC 7951 JSON, addressing both the 400 errors and the need to produce a payload quickly. The XML-export approach is otherwise model-driven and validated, but XML is a different encoding from the JSON body required here; a valid XML instance cannot simply be submitted as RESTCONF JSON. Retrieving the existing VLAN subtree through RESTCONF can provide useful, correctly namespaced JSON, but reusing that response does not create the desired configuration when it differs from the device’s current VLAN state. Using the latest public model revision also offers a familiar schema-driven workflow, yet it misses the explicit fact that the team has the device’s exact models: revisions can differ in available nodes, constraints, or types, so validation against another revision does not establish compatibility with this device. Exam caveat: RESTCONF supports both JSON and XML, but the request’s chosen media type and payload encoding must agree. Practical check: compare the exported JSON’s module-qualified keys and structure with the device’s loaded YANG modules, then confirm the request uses the matching RESTCONF Content-Type.