The Simple Structured Data Format (SSDF), is a format for storing structured (scientific) data.
The goal of the format is to be easily readable by humans as well as computers. It is aimed for use in interpreted languages like Python or Matlab, but it can be used in any language that supports the seven datatypes listed below.
SSDF has similar goals as JSON, but also enables (relatively) efficient storing of binary data and is much easier to read.
Data types and example
# SSDF supports 7 datatypes # 1: float scalars a_float = 4.0 # 2: integer scalars an_int = 3 # 3: Unicode strings a_string = 'SSDF is easy as py' # 4: Lists are container elements (and can in turn contain lists or dictionaries) more_info = list: 'As in Python, structure is implemented through indentation,' 'and a colon behind the container element.' 5 'as you can see, elements in a list have no name' # 5: A dictionary is a container too a_dict = dict: text = 'lists with only floats, ints and strings can be on a single line' single_line_list = [1.0, 2, 'foo', 'bar'] # 6: arrays - SSDF supports readable as well as binary (compressed) arrays. a_small_array = array 2x3 int32 1, 2, 3, 4, 5, 6 an_array_with_all_zeros = array 32x32 float32 eJztwQENAAAAwqD3T20PBxQAAADwbhAAAAE= # 7: ... nothing = None # or Null
SSDF is well suited for storing scientific data, and provides a way to create a datastore that can be opened and edited with any text editor. SSDF is also very suitable for configuration files or ini-like files.
One spec, two formats
Since version 2.0, ssdf actually consists of two formats: the text format, and a binary format which is fully compatible. The binary format is more efficient and uses compression on the whole file (the text format only compresses arrays). It is more suited for storing really large databases or structures containing large arrays.