Open-RJ Logo Open-RJ


Home page

Download Open-RJ

Samples application for your edification

Documentation for the Open-RJ API and mappings

What's been happening with Open-RJ?

Who's involved with Open-RJ?

Who's using Open-RJ?

Get in contact with the Open-RJ team


Page updated:

Home

Welcome to the home of the Record-Jar API

What is Open-RJ?

Open-RJ is an open-source library that implements readers of the Record-Jar structured text file format. It is implemented in C & C++, with a C-API. The implementation of the basic library is platform-independent. Mappings are provided to several languages (including C++, D, .NET, Python, Ruby and STL), and others (COM, Java, Perl) are planned. In addition to platform-independence, the library focuses on small runtime costs - memory and speed - and the classic UNIX attributes of discoverability and visibility.

What is the Record-Jar format?

As described in the excellent book "The Art Of UNIX Programming", a Record-Jar structured format file consists of records and fields.

A field is a single line - optionally extended with trailing '\' - that contains a name, separated from an optional value by ':'.

A record is a list of fields, whose contents are arbitrary and can vary between records in the same database. Records are separated by a line that begins with "%%". The record separator also acts as a comment, so anything can come on a record separator line after the first two characters.

A database is a correctly parsed Record-Jar file. The Open-RJ API (and language mappings) provide access to all the records in the database and the complete set of fields. Hence, you may work with fields on a per-record basis, or treat the database as a single record and with all fields in the database.

A very simple Record-Jar file, representing a Pets Database, is shown in the table on the right-hand side of this page.

And that's pretty much all there is to it. There are no restrictions on what fields may be in a record, and no controls over whether all records have the same fields or not. That's the job of higher layers of application functionality. We keep Record-Jar simple so it's reliable, portable and fast, and it's those things in spades!

%% Pets
 
Name:    Barney
Species: Dog
Breed:   Bijon \
         Frieze
%%
 
Name:    Samson
Species: Dog
Breed:   Ridgeback
%%
 
Name:    Fluffy Kitten
Species: Cat
%%
 
Valid XHTML 1.0! Website content and Open-RJ implementation © Greg Peet & Matthew Wilson SourceForge.net Logo