QuestionQ101

Automation and AI

Refer to the exhibit.

Question Image

A network engineer is examining how the json library is used in a Python script intended to access response content from a Cisco wireless network API endpoint. The engineer wants to understand better how the script uses these elements to process device information.

Which approach does the script use to accomplish its data-extraction goal?

  • A dumps function
  • B loads function
  • C split method
  • D to_dict method
Explanation

The response JSON is deserialized into Python list and dictionary objects so the script can iterate through client records and retrieve fields with get(). This is JSON decoding behavior equivalent to json.loads(), which converts a JSON string, bytes object, or bytearray into a Python object.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!