NetJSON is a data interchange format based on JSON designed to ease the development of software tools for computer networks.
NetJSON defines several types of JSON objects and the manner in which they are combined to represent a network: configuration of devices, monitoring data, network topology and routing information.
Our goal is to build an ecosystem of interoperable software tools that are able to work with the basic building blocks of layer2 and layer3 networks, enabling developers to build great networking applications faster.
{
"type": "DeviceConfiguration",
"general": {
"hostname": "RouterA"
},
"interfaces": [
{
"name": "lo0",
"type": "ethernet",
"addresses": [
{
"address": "127.0.0.1",
"mask": 8,
"proto": "static",
"family": "ipv4"
}
]
},
{
"name": "eth0",
"type": "ethernet",
"addresses": [
{
"address": "192.168.1.1",
"mask": 24,
"proto": "static",
"family": "ipv4"
}
]
}
]
}
{
"type": "NetworkGraph",
"protocol": "olsr",
"version": "0.6.6",
"revision": "5031a799fcbe17f61d57e387bc3806de",
"metric": "etx",
"router_id": "172.16.40.24",
"label": "Test Network",
"nodes": [
{
"id": "172.16.40.24",
"label": "node A",
"properties": {
"hostname": "node1.my.net"
}
},
{
"id": "172.16.40.60",
"label": "node B",
"properties": {
"hostname": "node2.my.net"
}
},
{
"id": "172.16.41.1",
"label": "node C",
"properties": {
"hostname": "node3.my.net"
}
}
],
"links": [
{
"source": "172.16.40.24",
"target": "172.16.40.60",
"cost": 1.000
},
{
"source": "172.16.40.24",
"target": "172.16.41.1",
"cost": 1.000
},
{
"source": "172.16.40.60",
"target": "172.16.41.1",
"cost": 1.000
}
]
}
{
"type": "DeviceMonitoring",
"general": {
"hostname": "RouterA",
"uptime": 3501937
},
"interfaces": [
{
"name": "lo0",
"uptime": 1404305354,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 9287737,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 57624,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 57624,
"rx_errors": 0,
"tx_bytes": 9287737,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
{
"name": "eth0",
"uptime": 1294305354,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 3542783708,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 35118502,
"tx_heartbeat_errors": 0,
"rx_dropped": 14,
"tx_aborted_errors": 0,
"tx_packets": 11761973,
"rx_errors": 0,
"tx_bytes": 2952333765,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
}
]
}
{
"type": "NetworkRoutes",
"protocol": "olsrv2",
"version": "0.8.2",
"revision": "v0.8.2-6-ge2e3acc",
"metric": "ff_dat_metric",
"router_id": "192.168.0.101",
"routes": [
{
"destination": "192.168.0.102",
"next": "169.254.1.102",
"cost": 4292352,
"device": "eth1"
}
]
}
{
"type": "NetworkCollection",
"collection": [
{
"type": "DeviceConfiguration",
"general": {
"hostname": "RouterA"
},
"interfaces": [
{
"name": "eth0",
"type": "ethernet",
"addresses": [
{
"address": "192.168.1.1",
"mask": 24,
"proto": "static",
"family": "ipv4"
}
]
}
]
},
{
"type": "DeviceConfiguration",
"general": {
"hostname": "RouterB"
},
"interfaces": [
{
"name": "eth0",
"type": "ethernet",
"addresses": [
{
"address": "192.168.1.2",
"mask": 24,
"proto": "static",
"family": "ipv4"
}
]
}
]
}
]
}