当前位置: 首页 > 工具软件 > ain > 使用案例 >

YAML Ain’t Markup Language (YAML™) Version 1.2

段干茂实
2023-12-01

YAML Ain’t Markup Language (YAML™) Version 1.2
3rd Edition, Patched at 2009-10-01
Oren Ben-Kiki
oren@ben-kiki.org
Clark Evans
cce@clarkevans.com
Ingy döt Net
ingy@ingy.net

Latest (patched) version:
HTML: http://yaml.org/spec/1.2/spec.html
PDF: http://yaml.org/spec/1.2/spec.pdf
PS: http://yaml.org/spec/1.2/spec.ps
Errata: http://yaml.org/spec/1.2/errata.html
Previous (original) version: http://yaml.org/spec/1.2/2009-07-21/spec.html

Copyright © 2001-2009 Oren Ben-Kiki, Clark Evans, Ingy döt Net
This document may be freely copied, provided it is not modified.

Status of this Document

This document reflects the third version of YAML data serialization language. The content of the specification was arrived at by consensus of its authors and through user feedback on the yaml-core mailing list. We encourage implementers to please update their software with support for this version.

The primary objective of this revision is to bring YAML into compliance with JSON as an official subset. YAML 1.2 is compatible with 1.1 for most practical applications - this is a minor revision. An expected source of incompatibility with prior versions of YAML, especially the syck implementation, is the change in implicit typing rules. We have removed unique implicit typing rules and have updated these rules to align them with JSON’s productions. In this version of YAML, boolean values may be serialized as “true” or “false”; the empty scalar as “null”. Unquoted numeric values are a superset of JSON’s numeric production. Other changes in the specification were the removal of the Unicode line breaks and production bug fixes. We also define 3 built-in implicit typing rule sets: untyped, strict JSON, and a more flexible YAML rule set that extends JSON typing.

The difference between late 1.0 drafts which syck 0.55 implements and the 1.1 revision of this specification is much more extensive. We fixed usability issues with the tagging syntax. In particular, the single exclamation was re-defined for private types and a simple prefixing mechanism was introduced. This revision also fixed many production edge cases and introduced a type repository. Therefore, there are several incompatibilities between syck and this revision as well.

The list of known errors in this specification is available at http://yaml.org/spec/1.2/errata.html. Please report errors in this document to the yaml-core mailing list. This revision contains fixes for all errors known as of 2009-10-01.

We wish to thank implementers who have tirelessly tracked earlier versions of this specification, and our fabulous user community whose feedback has both validated and clarified our direction.

Abstract

YAML™ (rhymes with “camel”) is a human-friendly, cross language, Unicode based data serialization language designed around the common native data types of agile programming languages. It is broadly useful for programming needs ranging from configuration files to Internet messaging to object persistence to data auditing. Together with the Unicode standard for characters, this specification provides all the information necessary to understand YAML Version 1.2 and to create programs that process YAML information.

 类似资料: