[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AJA(*) data formats



> > I prefer working with JSON data for Web UI data transfers, and of course
> > JSON libraries are available for most languages by now.

I'm a fan of JSON for js scripting on the clientside.  Our REST interface, 
(which XMLHTTP will probably use) will focus primarily on XML, and XML 
translation.  

*However*, I do plan on building into the REST interface a way of 
automatically translating inputs and outputs as needed (either through XSLT 
or XML::Twig/SAX, whatever)  I intend on supporting a ?as=JSON or ?as=XBRL 
or ?as=EDI query string on every request.  I think this is a valuable 
feature, especially for AJA(X/J) type scripting.

It also makes it a lot easier (hopefully) for external 3rd party applications 
to integrate nicely with LSMB, right out of the box.

> > On the server-side, YAML (coincidentally a superset of JSON) is probably
> > [ ... ]

I'm also a fan of YAML, it's fantastic for configuration files, and a great 
concise and readable data serialization format.

> > I'd like to see LedgerSMB have a documented YAML representation for most
> > entities in the LedgerSMB schema.

YAML maps to XML which maps nicely to JSON, etc.  It's really just a matter of 
verbosity of the language, and niggly syntax issues.  The Core team's focus 
is to embrace XML as the lingua franca for data exchange, and offer 
translations from the 'Core XML' format when possible.

> > As a series of YAML documents, this journal would be loadable by most
> > [ ... ]

I believe you can already do this by examining the ledger in the database.  We 
can probably trivially produce a journal from the database of all 
transactions in sequence, in YAML or any other format.

Jason