[gmx-developers] libxml2 versus JSON

Erik Lindahl erik.lindahl at gmail.com
Wed May 25 15:43:12 CEST 2016


Hi,

> On 25 May 2016, at 14:58, David van der Spoel <spoel at xray.bmc.uu.se> wrote:
>> 
> Why?
> Maybe I misunderstand you completely, but if we assume we fill a data structure, the intermediate routine (doing the JSON I/O) can do what it likes right? A structure like
> 
> struct GmxTree
> {
>   std::string    name, value;
>   struct GmxTree branch;
>   struct GmxTree next;
> };
> 
> can be mapped to most anything, right?

… and that’s pretty much exactly the problem with that approach :-) That would “solve” the problem by just exposing a lower-level data structure, there would be no standard whatsoever for how we do or document things, and before we know it each file would have its own set of standards.

We need logically consistent ways or organizing (and naming) or data, and the API for our module should likely try to reflect this logic rather than rewriting a low-level API to JSON.

Cheers,

Erik




More information about the gromacs.org_gmx-developers mailing list