When you want to transport a complex data structure between components of a distributed system you’re usually using a platform-independent data encoding format like XML, YAML, or JSON.
XML was the hip encoding format in days when Junos and Cisco Nexus OS was designed and lost most of its popularity in the meantime due to its complexity (attributes, namespaces…) that makes it hard to deal with XML documents in most programming languages.
JSON is the new cool kid on the block. It’s less complex than XML, maps better into data structures supported by modern programming languages, and has decently fast parser implementations.
Last week I wrote about the interesting challenges you might encounter when using data generated by a Junos device in an Ansible playbook. Unfortunately it’s not just Junos – every system built around XML-based data structures might experience the same issues, including Cisco Nexus OS.
In the last weeks I described the challenges you might face when converting XML documents that contain lists with a single element into JSON, be it on device (Nexus OS) or in an Ansible module. Now let’s see how we can fix that.
Blog posts in this series
- BGP Essentials
- What Is SDN?
- OpenFlow Basics
- Valley-Free Routing
- BGP Next Hops
- Fast Failover
- Firewalls on End Hosts
- High Availability Service Clusters
- Unequal-Cost Multipath Packet Forwarding
- Disaster Recovery
- Packet Forwarding Basics
- CI/CD in Networking
- The OpenFlow/SDN Hype
- netsim-tools Has Been Renamed
- Build Virtual Labs with netlab
- Network Infrastructure as Code
- Interfaces and Ports
- High Availability in Private and Public Clouds
- BGP in Data Center Fabrics
- Integrated Routing and Bridging (IRB) Designs
- Anycast Resources
- Site and Host Multihoming
- Data Center Switching ASICs
- Multi-Chassis Link Aggregation
- CLI versus API
- DHCP Relaying
- Unnumbered IPv4 Interfaces
- High Availability Switching
- Distributed Systems
- Single Source of Truth (SSoT) in Network Automation