Data Formats: Reading and writing JSON – XML - YAML

CSUC - Consorci de Serveis Universitaris de Catalunya
CSUC - Consorci de Serveis Universitaris de CatalunyaPromotion & Marketing Coordinator à CSUC - Consorci de Serveis Universitaris de Catalunya
GN5-1
Public (PU)
Internet2 Technology Exchange, 19-09-2023
Minneapolis, USA
Data Formats: Reading and writing
JSON – XML - YAML
Maria Isabel Gandia Carriedo, CSUC/RedIRIS
network-eacademy@lists.geant.org
2 | GN5-1
Definitions
• Data modelling (YANG, TOSCA)
• Defines a representation of real-world
entities, their relationships and
structure
• Data formats (XML, JSON, YAML)
• Define how to encode the information
in a standardized way
• Protocols (NETCONF, RESTCONF, gRPC...)
• Define the operations, the requests
and responses of interactions
The real world
Gets represented as a
Data model
Is encoded in a
Data format
Protocol
Are used within a
3 | GN5-1
Data Serialisation Examples – Human Readable
XML
</>
JSON
{}
YAML
indentation
---
device:
type: router
vendor: MyOAVvendor
ports: 4
description: Access
{
“device”: {
“type”: “router”,
“vendor”: “MyOAVvendor”,
“ports”: 4,
“description”: “Access”
}
}
<network>
<device>
<type>router</type>
<vendor>MyOAVvendor</vendor>
<ports>4</ports>
<description>Access</description>
</device>
</network>
4 | GN5-1
Writing JSON, XML and YAML files
• You can write JSON, XML and YAML files with any text editor like vim or emacs
• If you like syntax highlighting, editors/IDEs such as Visual Studio Code,
Notepad++, Sublime.
5 | GN5-1
Challenges Achievements Conclusions Q&A
Some Free Tools to Help You Write, Validate and Convert Your Files
• You can check your syntax, format your files or convert them using useful free
tools:
• https://www.freeformatter.com
• https://www.liquid-technologies.com/online-xml-validator
• https://onlineyamltools.com/edit-yaml
• https://www.yamllint.com/
• https://www.json2yaml.com/
6 | GN5-1
Some Cases Where We Use JSON, YAML, XML
• Web API output (AWS, Google maps, Github, X,...)
• Jenkins
• ELK stack (Elasticsearch, Logstash, Kibana)
JSON:
• Jenkins
• NETCONF
• RESTCONF
XML:
• Ansible
• Kubernetes
• Docker
YAML:
- hosts: core
tasks:
- name: Describe router interfaces
ios_interface:
name: "{{ item.name }}"
description: "{{ item.description }}"
state: present
provider: "{{ credentials }}"
with_items:
- { name: Ethernet0/0, description: “One" }
- { name: Ethernet0/1, description: “Two” }
<copy-config>
<target>
<startup/>
</target>
<source>
<running/>
</source>
</copy-config>
7 | GN5-1
Challenges Achievements Conclusions Q&A
More Information in the Network Automation eAcademy
https://wiki.geant.org/display/NETDEV/OAV+Training+Portal
• Formats: YAML (30')
• Formats: XML (60’)
• Formats: JSON (45’)
www.geant.org
Thank You!
https://wiki.geant.org/display/NETDEV/NeA
network-eacademy@lists.geant.org
netdev@lists.geant.org
1 sur 8

Recommandé

Microtask Crowdsourcing Applications for Linked Data par
Microtask Crowdsourcing Applications for Linked DataMicrotask Crowdsourcing Applications for Linked Data
Microtask Crowdsourcing Applications for Linked DataEUCLID project
2.2K vues34 diapositives
Computing Outside The Box June 2009 par
Computing Outside The Box June 2009Computing Outside The Box June 2009
Computing Outside The Box June 2009Ian Foster
766 vues68 diapositives
layer3_switching par
layer3_switchinglayer3_switching
layer3_switchingRobert Ciampa
136 vues14 diapositives
Diploma in Information Technology par
Diploma in Information TechnologyDiploma in Information Technology
Diploma in Information Technologymahatmagandhiuniversity
554 vues10 diapositives
Diploma in computer applications par
Diploma in computer applicationsDiploma in computer applications
Diploma in computer applicationsmahatmagandhiuniversity
641 vues10 diapositives
Toward universal information access on the digital object cloud par
Toward universal information access on the digital object cloudToward universal information access on the digital object cloud
Toward universal information access on the digital object cloudNational Institute of Informatics
233 vues19 diapositives

Contenu connexe

Similaire à Data Formats: Reading and writing JSON – XML - YAML

Reference Representation in Large Metamodel-based Datasets par
Reference Representation in Large Metamodel-based DatasetsReference Representation in Large Metamodel-based Datasets
Reference Representation in Large Metamodel-based DatasetsMarkus Scheidgen
1.3K vues49 diapositives
Computing Outside The Box September 2009 par
Computing Outside The Box September 2009Computing Outside The Box September 2009
Computing Outside The Box September 2009Ian Foster
624 vues69 diapositives
Big Data to SMART Data : Process Scenario par
Big Data to SMART Data : Process ScenarioBig Data to SMART Data : Process Scenario
Big Data to SMART Data : Process ScenarioCHAKER ALLAOUI
2.1K vues70 diapositives
D0373024030 par
D0373024030D0373024030
D0373024030theijes
463 vues7 diapositives
DATABASE SYSTEMS PERFORMANCE EVALUATION FOR IOT APPLICATIONS par
DATABASE SYSTEMS PERFORMANCE EVALUATION FOR IOT APPLICATIONSDATABASE SYSTEMS PERFORMANCE EVALUATION FOR IOT APPLICATIONS
DATABASE SYSTEMS PERFORMANCE EVALUATION FOR IOT APPLICATIONSijdms
20 vues14 diapositives
Apache Drill: An Active, Ad-hoc Query System for large-scale Data Sets par
Apache Drill: An Active, Ad-hoc Query System for large-scale Data SetsApache Drill: An Active, Ad-hoc Query System for large-scale Data Sets
Apache Drill: An Active, Ad-hoc Query System for large-scale Data SetsMapR Technologies
3.3K vues36 diapositives

Similaire à Data Formats: Reading and writing JSON – XML - YAML(20)

Reference Representation in Large Metamodel-based Datasets par Markus Scheidgen
Reference Representation in Large Metamodel-based DatasetsReference Representation in Large Metamodel-based Datasets
Reference Representation in Large Metamodel-based Datasets
Markus Scheidgen1.3K vues
Computing Outside The Box September 2009 par Ian Foster
Computing Outside The Box September 2009Computing Outside The Box September 2009
Computing Outside The Box September 2009
Ian Foster624 vues
Big Data to SMART Data : Process Scenario par CHAKER ALLAOUI
Big Data to SMART Data : Process ScenarioBig Data to SMART Data : Process Scenario
Big Data to SMART Data : Process Scenario
CHAKER ALLAOUI2.1K vues
D0373024030 par theijes
D0373024030D0373024030
D0373024030
theijes463 vues
DATABASE SYSTEMS PERFORMANCE EVALUATION FOR IOT APPLICATIONS par ijdms
DATABASE SYSTEMS PERFORMANCE EVALUATION FOR IOT APPLICATIONSDATABASE SYSTEMS PERFORMANCE EVALUATION FOR IOT APPLICATIONS
DATABASE SYSTEMS PERFORMANCE EVALUATION FOR IOT APPLICATIONS
ijdms20 vues
Apache Drill: An Active, Ad-hoc Query System for large-scale Data Sets par MapR Technologies
Apache Drill: An Active, Ad-hoc Query System for large-scale Data SetsApache Drill: An Active, Ad-hoc Query System for large-scale Data Sets
Apache Drill: An Active, Ad-hoc Query System for large-scale Data Sets
MapR Technologies3.3K vues
Multi-Model Data Query Languages and Processing Paradigms par Jiaheng Lu
Multi-Model Data Query Languages and Processing ParadigmsMulti-Model Data Query Languages and Processing Paradigms
Multi-Model Data Query Languages and Processing Paradigms
Jiaheng Lu140 vues
Network Layered Models Rroosend par rroosend
Network Layered Models RroosendNetwork Layered Models Rroosend
Network Layered Models Rroosend
rroosend680 vues
Bridging Socially-Enhanced Virtual Communities par Daniel Schall
Bridging Socially-Enhanced Virtual CommunitiesBridging Socially-Enhanced Virtual Communities
Bridging Socially-Enhanced Virtual Communities
Daniel Schall1.3K vues
The need of Interoperability in Office and GIS formats par Markus Neteler
The need of Interoperability in Office and GIS formatsThe need of Interoperability in Office and GIS formats
The need of Interoperability in Office and GIS formats
Markus Neteler964 vues
Getting started with YANG par CoreStack
Getting started with YANGGetting started with YANG
Getting started with YANG
CoreStack2.2K vues
Opportunities for X-Ray science in future computing architectures par Ian Foster
Opportunities for X-Ray science in future computing architecturesOpportunities for X-Ray science in future computing architectures
Opportunities for X-Ray science in future computing architectures
Ian Foster363 vues
How to make data more usable on the Internet of Things par PayamBarnaghi
How to make data more usable on the Internet of ThingsHow to make data more usable on the Internet of Things
How to make data more usable on the Internet of Things
PayamBarnaghi2K vues
Azure Databricks for Data Scientists par Richard Garris
Azure Databricks for Data ScientistsAzure Databricks for Data Scientists
Azure Databricks for Data Scientists
Richard Garris281 vues
Triplificating and linking XBRL financial data par Roberto García
Triplificating and linking XBRL financial dataTriplificating and linking XBRL financial data
Triplificating and linking XBRL financial data
Roberto García1.5K vues
Modèles de données et langages de description ouverts 6 - 2021-2022 par François-Xavier Boffy
Modèles de données et langages de description ouverts   6 - 2021-2022Modèles de données et langages de description ouverts   6 - 2021-2022
Modèles de données et langages de description ouverts 6 - 2021-2022

Plus de CSUC - Consorci de Serveis Universitaris de Catalunya

The Research Portal of Catalonia: Growing more (information) & more (services) par
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
141 vues25 diapositives
Facilitar la gestión, visibilidad y reutilización de los datos de investigaci... par
Facilitar la gestión, visibilidad y reutilización de los datos de investigaci...Facilitar la gestión, visibilidad y reutilización de los datos de investigaci...
Facilitar la gestión, visibilidad y reutilización de los datos de investigaci...CSUC - Consorci de Serveis Universitaris de Catalunya
72 vues26 diapositives
La gestión de datos de investigación en las bibliotecas universitarias españolas par
La gestión de datos de investigación en las bibliotecas universitarias españolasLa gestión de datos de investigación en las bibliotecas universitarias españolas
La gestión de datos de investigación en las bibliotecas universitarias españolasCSUC - Consorci de Serveis Universitaris de Catalunya
107 vues13 diapositives
Disposes de recursos il·limitats? Prioritza estratègicament els teus projecte... par
Disposes de recursos il·limitats? Prioritza estratègicament els teus projecte...Disposes de recursos il·limitats? Prioritza estratègicament els teus projecte...
Disposes de recursos il·limitats? Prioritza estratègicament els teus projecte...CSUC - Consorci de Serveis Universitaris de Catalunya
19 vues40 diapositives
Les persones i les seves capacitats en el nucli de la transformació digital. ... par
Les persones i les seves capacitats en el nucli de la transformació digital. ...Les persones i les seves capacitats en el nucli de la transformació digital. ...
Les persones i les seves capacitats en el nucli de la transformació digital. ...CSUC - Consorci de Serveis Universitaris de Catalunya
19 vues16 diapositives
Enginyeria Informàtica: una cursa de fons par
Enginyeria Informàtica: una cursa de fonsEnginyeria Informàtica: una cursa de fons
Enginyeria Informàtica: una cursa de fonsCSUC - Consorci de Serveis Universitaris de Catalunya
11 vues17 diapositives

Plus de CSUC - Consorci de Serveis Universitaris de Catalunya(20)

Dernier

Cencora Executive Symposium par
Cencora Executive SymposiumCencora Executive Symposium
Cencora Executive Symposiummarketingcommunicati21
160 vues14 diapositives
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 par
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023BookNet Canada
44 vues19 diapositives
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... par
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...ShapeBlue
171 vues28 diapositives
"Node.js Development in 2024: trends and tools", Nikita Galkin par
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin Fwdays
33 vues38 diapositives
Business Analyst Series 2023 - Week 4 Session 7 par
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
146 vues31 diapositives
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue par
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlueShapeBlue
152 vues23 diapositives

Dernier(20)

Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 par BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada44 vues
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... par ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue171 vues
"Node.js Development in 2024: trends and tools", Nikita Galkin par Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays33 vues
Business Analyst Series 2023 - Week 4 Session 7 par DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10146 vues
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue par ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue152 vues
"Surviving highload with Node.js", Andrii Shumada par Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays58 vues
Optimizing Communication to Optimize Human Behavior - LCBM par Yaman Kumar
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBM
Yaman Kumar38 vues
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... par ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue199 vues
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... par Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro35 vues
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... par TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc176 vues
The Role of Patterns in the Era of Large Language Models par Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li91 vues
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... par ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue108 vues
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue par ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue139 vues
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... par ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue164 vues
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue par ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue207 vues

Data Formats: Reading and writing JSON – XML - YAML

  • 1. GN5-1 Public (PU) Internet2 Technology Exchange, 19-09-2023 Minneapolis, USA Data Formats: Reading and writing JSON – XML - YAML Maria Isabel Gandia Carriedo, CSUC/RedIRIS network-eacademy@lists.geant.org
  • 2. 2 | GN5-1 Definitions • Data modelling (YANG, TOSCA) • Defines a representation of real-world entities, their relationships and structure • Data formats (XML, JSON, YAML) • Define how to encode the information in a standardized way • Protocols (NETCONF, RESTCONF, gRPC...) • Define the operations, the requests and responses of interactions The real world Gets represented as a Data model Is encoded in a Data format Protocol Are used within a
  • 3. 3 | GN5-1 Data Serialisation Examples – Human Readable XML </> JSON {} YAML indentation --- device: type: router vendor: MyOAVvendor ports: 4 description: Access { “device”: { “type”: “router”, “vendor”: “MyOAVvendor”, “ports”: 4, “description”: “Access” } } <network> <device> <type>router</type> <vendor>MyOAVvendor</vendor> <ports>4</ports> <description>Access</description> </device> </network>
  • 4. 4 | GN5-1 Writing JSON, XML and YAML files • You can write JSON, XML and YAML files with any text editor like vim or emacs • If you like syntax highlighting, editors/IDEs such as Visual Studio Code, Notepad++, Sublime.
  • 5. 5 | GN5-1 Challenges Achievements Conclusions Q&A Some Free Tools to Help You Write, Validate and Convert Your Files • You can check your syntax, format your files or convert them using useful free tools: • https://www.freeformatter.com • https://www.liquid-technologies.com/online-xml-validator • https://onlineyamltools.com/edit-yaml • https://www.yamllint.com/ • https://www.json2yaml.com/
  • 6. 6 | GN5-1 Some Cases Where We Use JSON, YAML, XML • Web API output (AWS, Google maps, Github, X,...) • Jenkins • ELK stack (Elasticsearch, Logstash, Kibana) JSON: • Jenkins • NETCONF • RESTCONF XML: • Ansible • Kubernetes • Docker YAML: - hosts: core tasks: - name: Describe router interfaces ios_interface: name: "{{ item.name }}" description: "{{ item.description }}" state: present provider: "{{ credentials }}" with_items: - { name: Ethernet0/0, description: “One" } - { name: Ethernet0/1, description: “Two” } <copy-config> <target> <startup/> </target> <source> <running/> </source> </copy-config>
  • 7. 7 | GN5-1 Challenges Achievements Conclusions Q&A More Information in the Network Automation eAcademy https://wiki.geant.org/display/NETDEV/OAV+Training+Portal • Formats: YAML (30') • Formats: XML (60’) • Formats: JSON (45’)