Skip to Content
可编程网络自动化
book

可编程网络自动化

by Jason Edelman, Scott S. Lowe, Matt Oswalt
January 2023
Intermediate to advanced
458 pages
14h 16m
Chinese
Posts & Telecom Press
Content preview from 可编程网络自动化
数据格式与数据模型
135
型),也就是说,可以在
XML
文档中包含非常特殊的数据类型。那
JSON
呢?
JSON
也有模式约束机制:
JSON Schema
。该规范现已被作为互联网草案提交。
JSON Schema
已有
Python
以及其他语言的实现。
在结束本章之前,我们想讨论一种独立于特定数据格式的数据模型描述方法。
XSD
仅适用
XML
,而
JSON
Schema
仅适用于
JSON
。有没有一种数据模型描述方法可以同时适用
XML
JSON
呢?确实有,下一节将讨论这种解决方案:
Y
ANG
5.5
 使用
YANG
描述数据模型
本章一直在讨论特定数据格式下的数据模型,比如如何在
XML
JSON
中强制数据模型。
本节会回过头来,从更一般的角度看待数据模型,然后以使用
Y
ANG
描述网络特定的数据
模型作为结束。
为了帮助你巩固数据模型的概念,下面快速回顾一下有关数据模型的几点关键事实。
数据模型描述了以模式语言(如
XSD
)为形式的受约束数据集。
数据模型使用定义良好的类型和参数来形成数据的结构化标准描述。
数据模型不传输数据,也不在乎底层使用的传输协议(例如,既可以在
HTTP
之上使用
JSON
,也可以在
HTTP
之上使用
XML
)。
你现在已经明白了何为数据模型,接下来,将重点转向
Y
ANG
5.5.1
 
YANG
概述
YANG
RFC 6020
所定义的一种数据建模语言。它与前面提到过的用于通用
XML
数据
XSD
类似
,但
YANG
专门针对的是网络构造。
YANG
不仅能建模配置和操作状态数据,
还能建模普通
RPC
数据。这使得我们可以对常规任务进行建模,比如升级设备。 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

弱监督学习实用指南

弱监督学习实用指南

Wee Hyong Tok, Amit Bahree, Senja Filipi
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
Go程序设计语言

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787115606181