From the course: Cisco CCNA (200-301) Cert Prep: 3 Security, Automation, and Programmability

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Interpreting JSON

Interpreting JSON

- [Greg] Sysco really wants engineers to be familiar with JavaScript object notation, or JSON. So I'm going to dig a little deeper. First, I'll simply take a look at a JSON reply from DNA center. It's actually fairly easy to read, as they are broken down into key, then colon, then key pairs. So host name is then followed by the router's host name. Whenever I see a colon, I know it represents a single key pair. The key is the quoted text before the colon. The key is the name that references a value. The value is the quoted data returned after the colon. This could be a text string value that's double quoted, a numeric value without quotes, an array, which is a special variable that contains many values, or an object. When more than one key pair is returned, each will be separated by a comma. Anything contained within curly braces is considered an object. Within this object can be one or a series of key pairs. Values enclosed within square brackets are part of an array. An example of an…

Contents