1.1 COMPARE data formats Flashcards
A data format with a tree structure, commonly used in automation. Root elements are at the top
XML
Uses a parent/child relationship between elements and uses tags to enclose the relationship. Attributes can also be assigned to tags
XML
Which data format is this?
<device>
<Hostname>Rtr01</Hostname>
<IPv4>192.168.1.5</IP4>
<IPv6> </IPv6>
</device>
</IPv4></device>
XML
A portable data structure that can be used in any language, built around Key/Value pairs
JSON
Consists of nested structured data models. Similar to Python dictionaries and is natively understood by the Python programming language
JSON
Which data format is this?
{
“interface”: {
“name”: “GigabitEthernet1”,
“description”: “Router Uplink”,
“enabled”: true,
“ipv4”: {
“address”: [
{
“ip”: “192.168.1.1”,
“netmask”: “255.255.255.0”
}
]
}
}
}
JSON
Designed to be a human readable data format with minimal syntax
YAML
Uses Key/Value pairs, Python-like indentation to differentiate blocks of information, the “-“ character to represent lists and includes comments
YAML
What data format is this?
interface:
name: GigabitEthernet2
description: Wide Area Network
enabled: true
ipv4:
address:
- ip: 172.16.0.2
netmask: 255.255.255.0
YAML