Concepts / Automation and APIs

Automation and APIs

JSON

Also called jq, object, array, key-value, YAML, XML, data serialization, data format

The text format APIs exchange data in: objects of key: value pairs, arrays, strings, numbers, true, false and null.

Six kinds of value, nested
Six kinds of value, nested

Braces hold an object of quoted keys with values; square brackets hold an ordered list. A value is a string, a number, true or false, null, or another object or array.

JSON is the text format APIs exchange data in. { } holds an object: keys in double quotes, each with a value. [ ] holds an array, an ordered list. A value is a string, a number, true, false, null, an object or an array, nested as deep as needed. jq pretty-prints it (jq .) and picks parts out (jq '.interfaces[].name'). YAML and XML write the same data another way.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab