[Openchemistry-developers] ChemicalJSON key capitalization

David Cole david.cole at kitware.com
Wed Jun 13 15:23:27 EDT 2012


Me too. Standardize on all lower-case. Case-insensitive compares/lookups
always require conversion and are therefore ALWAYS SLOWER, even if it may
only be marginally.


On Wed, Jun 13, 2012 at 3:10 PM, Ian Daniher <ian at nonolithlabs.com> wrote:

> 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
>>
>
>
> _______________________________________________
> Openchemistry-developers mailing list
> Openchemistry-developers at openchemistry.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/openchemistry-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/openchemistry-developers/attachments/20120613/f40d007b/attachment.html>


More information about the Openchemistry-developers mailing list