Page updated:
|
HomeWelcome 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! |
|
Website content and Open-RJ implementation © Greg Peet & Matthew Wilson |