为什么Microsoft在Azure管道中不使用json而不是yml? [英] Why did Microsoft not go with json instead of yml for Azure pipelines?
问题描述
我开始学习Azure开发人员.您可以使用yml配置Azure管道.我只是想知道微软为什么要使用yml.这也可以用json完成.只是好奇为什么不使用一种非常流行的格式?
I am starting to learn Azure dev-ops. You can configure your Azure-pipelines with yml. I was just wondering why did Microsoft go with yml. This could have been done with json as well. Just curious as to why not use a format that is quite popular?
推荐答案
YAML可以更好地向您解释脚本的功能.原因是YAML是作为人类友好"的数据序列化语言出售的.JSON和XML也是数据序列化语言,但是它们并不是在着重于可读性的情况下创建的.毕竟,JSON本身并不支持注释(您必须为此使用JSONC,或者使用另一种支持注释的JSON实现).
YAML is in a better position to be able to explain to you what the script is doing. The reason for this is that YAML is sold as a "human friendly" data serialisation language. JSON and XML are also data serialisation languages, but they weren't so much created with a focus on readability. After all, JSON doesn’t natively support comments (You'd have to use JSONC for that, or another implementation of JSON that supports comments).
YAML将自己定位为人类可读的数据序列化"语言.因此,目的很明确-使读取和写入结构化数据变得容易.这是此博客的摘录,您可以参考
YAML positions itself as a "human-readable data-serialisation" language. So the intent is clear - to make it easy to read and write structured data. This is an excerpt from this blog, you can refer to it.
这篇关于为什么Microsoft在Azure管道中不使用json而不是yml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!