libxnm

A library for parsing and retrieving data from the XNM file format.
Download

libxnm Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Price:
  • FREE
  • Publisher Name:
  • Dov Grobgeld
  • Publisher web site:

libxnm Tags


libxnm Description

A library for parsing and retrieving data from the XNM file format. libxnm project is a library for parsing and retrieving data from the XNM file format.The prevailing meta-format used today for serialization is XML. XML was originally written as a markup language, and as such its original intent was to add additional information to free flowing text.This is indeed what is needed in the context of text markup, e.g. for a web page or a word processor program. But using XML for general purpose object serialization generates very verbose serialization that are way larger than necessary.Another shortcoming of XML is that there still is no support for binary objects. This again is partly based in its markup roots.Examples of XNM The following example shows a simple program configuration file: fontsize: 16 fonts: { roman: Sans italic: "Sans Italic" bold: "Sans bold" } path: Here is another example copied from the wikipedia json page: firstName: John lastName: Smith address: { city: "New York, NY" zipCode: 10021 streetAddress: "21 2nd Street" } phoneNumbers: The main (only) differences to JSON are: Single words don't need quotes Commas are not used between key/value pairs Here is a third example translated from the gaim prefs file: core => { away => { idle_reporting=>system away_when_idle=>0 mins_before_way=>10 auto_reply=>awayidle report_idle=>1 } buddies => {} contact => { last_match => 0 offline_score => 2 away_score => 2 idle_score => 1 } gaim => { gtk=> { browsers=> { place=>F command=>"xterm -e lynx %s" browser=>firefox new_window=>F } plugins => } }}Note that the separater character used between keys and values is => combination like in Perl. Here are some key features of "libxnm": · Recursively defined. · Map to the scalar/table/hash structures of perl/python/ruby · Not limited by preexisting language formats (JSON). · Short, consise, visually appealing. Low signal to noise. · No need to quote keys or one word values. · Support binary data. · Tables are enclosed by { } , arrays by . What's New in This Release: · This version adds an API call for retrieving a list of keys held by a table. · It also makes retrieving an empty key of a value return the value itself.


libxnm Related Software