[Openchemistry-developers] ChemicalJSON key capitalization

Ian Daniher ian at nonolithlabs.com
Wed Jun 13 15:10:36 EDT 2012


Making the parser case-insensitive breaks the precedent established by the
Python and Javascript JSON parsers. That said, I can't think of a reason
why you'd have "Formula" and "formula" in a cjson object and
case-insensitive is more durable.

My vote is for lowercase standardization.

On Wed, Jun 13, 2012 at 1:54 PM, Kyle Lutz <kyle.lutz at kitware.com> wrote:

> On Wed, Jun 13, 2012 at 1:25 PM, Ian Daniher <ian at nonolithlabs.com> wrote:
> > If you're going to have "inchi" instead of "InChI", you might as well go
> all
> > the way. It'd be great to see line 68 of chemjsonfileformat.cpp fixed.
>
> This should be an easy fix. I just need to know what the right fix is
> :-). I think we should to select one of the following options:
>
> 1. Standardize on all lower-case keys (e.g. always "inchi" instead of
> "InChI" and "chemical json" instead of "Chemical JSON").
> 2. Specify that all keys are to be parsed in a case-insensitive manner
> (e.g. "inchi", "InChI", and "INCHI" would all be valid).
> 3. Some other way I haven't though of...
>
> Thoughts?
>
> Cheers,
> Kyle
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/openchemistry-developers/attachments/20120613/ac9dbeed/attachment.html>


More information about the Openchemistry-developers mailing list