Implementing Cisco Enterprise Network Core Technologies (350-401 ENCOR) Exam Materials-Question 170 Discussion
Comment Image Comment Image Comment Image

Refer to the exhibit. Which two modifications are required so that the configuration fetched from the device is saved as a valid JSON-encoded file? (Choose two answers)

  • A. Add
    with open("config.json","w") as OutFile: OutFile.write(response.json)
    at the end of the script
  • B. Add
    headers={"Accept":"application/yang-data+json"},
    as a parameter to the requests.get() call
  • C. Add
    with open("config.json","w") as OutFile: OutFile.write(response.text)
    at the end of the script
  • D. Add
    headers={"Accept":"application/yang-data+xml"},
    as a parameter to the requests.get() call
  • E. Add
    json = True,
    as a parameter to the requests.get() call
Correct Answer: B,C

Brave-Dump Clients Votes

BE 100%

Comments



Anonymous User 2026-08-06 22:59:08

Selected Answers: B, E


Its B and E
  • Brave-Dumps.com Admin 2026-08-07 05:15:32
    can you explain why? Cisco RESTCONF supports application/yang-data+json for returning YANG data in JSON format. The Requests documentation shows that response.text contains the response body as text, while response.json() converts it into a Python object. Option A incorrectly uses response.json without parentheses and attempts to write it directly.