In the last lesson, you saw how to read a YANG model.
Now you will see where the models come from and how the data is written.Cisco devices support two families of YANG models.

Figure 1 - Open Models and Native Models
Open models come from organizations that are not vendors, such as the IETF and OpenConfig.
Native models come from the vendor, such as Cisco-IOS-XE-native.
An open model works on devices from several vendors.
A native model covers features that only one vendor has, such as EIGRP on Cisco.Answer the question below
Which family does Cisco-IOS-XE-native belong to: open or native?
The model describes the data.
The data itself is written in XML or in JSON.Here is one interface in XML:
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet0/1</name> <description>WAN</description> <enabled>true</enabled> </interface> </interfaces>Each value is between two tags, such as <name> and </name>.
The names of the tags are the names from the model.The xmlns attribute gives the namespace.
The namespace identifies the YANG model that the data follows.Answer the question below
Which XML attribute identifies the YANG model?
Here is the same interface in JSON:
{ "ietf-interfaces:interfaces": { "interface": [ { "name": "GigabitEthernet0/1", "description": "WAN", "enabled": true } ] } }In JSON, the top-level key starts with the name of the module.
The list interface is written between square brackets.The XML and the JSON follow the same ietf-interfaces model.
When the data does not follow the model, the router rejects it.Answer the question below
In the model, which type is the leaf enabled: string or boolean?
YANG does not send the data.
Two protocols send it:
Figure 2 - One Model, Two Protocols
NETCONF sends YANG data in XML.
RESTCONF sends YANG data in JSON or XML.
In the next lesson, you will see how NETCONF works.
Answer the question below
Which format does NETCONF use: XML or JSON?