TreeLDR Basics

The TreeLDR syntax is designed to be intuitive for software engineers. It revolves around the separation of two core concepts: types and layouts.

A type defines the logical relations between pieces of data, which is the basis of Linked Data. However, a type does not specify any particular layout to actually store or send the data between applications.

type SomeType {
	someProperty: OtherType
}

A layout defines a strict representation for a given type. It can then be used to store or send data between applications that share the same layout.

A layout definition can help developers maintain various pieces of code by giving an automatic definition for:

  • Programming languages type definitions

  • Conversion routines from/to data exchange formats (JSON, JSON-LD, etc.)

  • SQL Database schema definitions

  • etc.

TreeLDR allows one to define various layouts representing any type, or just a portion of it.

layout SomeLayout for SomeType {
	someProperty: PropertyLayout
}

Last updated