Difference between revisions of "LRM yaml Support"

From Lingoport Wiki
Jump to: navigation, search
(Multiple Documents)
(Multiple Documents)
Line 26: Line 26:
 
A file that contains multiple documents, indicated by '---' and '...' is not supported.
 
A file that contains multiple documents, indicated by '---' and '...' is not supported.
   
<nowiki />---
+
<nowiki />---
  +
doc1: value1
  +
<nowiki />...
  +
<nowiki />---
  +
doc2: value2
  +
<nowiki />...
   
  +
=== Blank Values ===
doc1: value1
 
  +
An empty string, such as '' is allowed but a blank value is not.
   
  +
this_is_valid: ""
<nowiki />...
 
  +
this_is_invalid:
 
  +
this_is_valid2: ''
<nowiki />---
 
 
doc2: value2
 
 
<nowiki />...
 

Revision as of 23:15, 25 November 2018

Yaml Parser

LRM supports YAML 1.2 and uses the snakeyaml1.2 engine to parse files. Information on snakeyaml can be found at snakeyaml

Unsupported YAML syntax

The following syntax is not supported by LRM.

Set format

A set is an unordered collection of nodes such that no two nodes are equal.

baseball players: !!set

? Mark McGwire
? Sammy Sosa
? Ken Griffey

# Flow style baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees }

Sequence format

A sequence is a collection indexed by sequential integers starting with zero.

Block style: !!seq

- Mercury
- Pluto

Flow style: !!seq [ Mercury, Pluto ]

Multiple Documents

A file that contains multiple documents, indicated by '---' and '...' is not supported.

 ---
 doc1: value1
 ...
 ---
 doc2: value2
 ...

Blank Values

An empty string, such as is allowed but a blank value is not.

 this_is_valid: ""
 this_is_invalid:
 this_is_valid2: