Configuration parsers are where quoting rules bite. YAML reads an unquoted yes as a boolean and 1.2.3 as a string; XML needs & escaped; TOML wants everything quoted. Generating the same records in all four shows exactly where each format differs.
What you can control
- Four formats from one field list, so you can compare how the same record is expressed.
- YAML scalars are quoted only when the value would otherwise be misread — the rule most hand-written YAML gets wrong.
- XML escapes ampersands and angle brackets, and arrays become repeated
<item>elements. - Java properties output flattens everything to
entity[0].field=value, matching how Spring reads indexed properties.
What this is not
The XML output has no namespace or schema declaration. Add an xsi:schemaLocation yourself if you are testing schema validation.
Questions
Why are some YAML values quoted and others not?
Because YAML would misparse them otherwise. A value starting with a digit, containing a colon, or reading as a boolean gets quoted; everything else does not need it.
Can I validate the XML against a schema?
Not out of the box — there is no XSD reference. Add one yourself, or use the output to check your parser rather than your schema.
What is the properties format for?
Java and Spring configuration. The indexed entity[0].field syntax is how Spring Boot binds a list of objects from a flat properties file.