Cookie-jar record separators combine well with the RFC 822 metaformat for records, yielding a
format we’ll call ‘record-jar’. If you need a textual format that will support multiple records with a
variable repertoire of explicit fieldnames, one of the least surprising and human-friendliest ways to
do it would look like Example 5.4.
Planet: Mercury
Orbital-Radius: 57,910,000 km
Diameter: 4,880 km
Mass: 3.30e23 kg
%%
Planet: Venus
Orbital-Radius: 108,200,000 km
Diameter: 12,103.6 km
Mass: 4.869e24 kg
%%
Planet: Earth
Orbital-Radius: 149,600,000 km
Diameter: 12,756.3 km
Mass: 5.972e24 kg
Moons: Luna
Example 5.4. Basic data for three planets in a record-jar format.
Of course, the record delimiter could be a blank line, but a line consisting of "%%\n"
is more explicit and less likely to be introduced by accident during editing
(two printable characters are better than one because it can’t be generated by a single-character typo).
In a format like this it is good practice to simply ignore blank lines.
The Art of Unix Programming
Eric S Raymond
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Returns the enum constant of this class with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this class. (Extraneous whitespace characters are
not permitted.)
Parameters:
name - the name of the enum constant to be returned.