Open Data Description Language


The Open Data Description Language is a generic text-based language that is designed to store arbitrary data in a concise human-readable format. It can be used as a means for easily exchanging information among many programs or simply as a method for storing a program's data in an editable format.
The exact syntax of OpenDDL is described on the website as well as in an appendix of the Open Game Engine Exchange Specification.

Structures

An OpenDDL file is composed of a sequence of structures that can be either user-defined types or built-in primitive data types. The declaration of a structure consists of an identifier followed by an optional name, an optional property list, and finally, the structure's contents enclosed in braces. Raw data is always contained within structures whose identifiers are one of the data types described in the next section. For example, one may define a Point structure that holds the floating-point coordinates of a three-dimensional point as follows.
Point
Structures can have names that allow them to be referenced from other parts of the file. Names can be global or local. A global name consists of a dollar sign followed by an identifier, and a local name consists of a percent sign followed by a dollar sign. The Point structure above could be given the global name "position" as follows.
Point $position
Another structure could then include a reference to this point by using the ref data type:
ref

Data types

OpenDDL defines the 15 primitive data types described in the following table. Each type has at a long name and a short name. Additionally, the floating-point types each have alternate long and short names.
TypeDescription
bool, bA boolean type that can have the value true or false.
int8, i8An 8-bit signed integer that can have values in the range .
int16, i16A 16-bit signed integer that can have values in the range .
int32, i32A 32-bit signed integer that can have values in the range .
int64, i64A 64-bit signed integer that can have values in the range .
unsigned_int8, u8An 8-bit unsigned integer that can have values in the range .
unsigned_int16, u16A 16-bit unsigned integer that can have values in the range .
unsigned_int32, u32A 32-bit unsigned integer that can have values in the range .
unsigned_int64, u64A 64-bit unsigned integer that can have values in the range .
half, float16, h, f16A 16-bit floating-point type conforming to the standard S1E5M10 format.
float, float32, f, f32A 32-bit floating-point type conforming to the standard S1E8M23 format.
double, float64, d, f64A 64-bit floating-point type conforming to the standard S1E11M52 format.
string, sA double-quoted character string with contents encoded in UTF-8.
ref, rA sequence of structure names, or the keyword null.
type, tA type whose values are identifiers naming types in the first column of this table.

Compatible Libraries