Discussion List Archives

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

Re: CIF-JSON draft 2017-05-15



On Fri, May 19, 2017 at 4:31 AM, Marcin Wojdyr <wojdyr@gmail.com> wrote:
On 19 May 2017 at 02:37, James Hester <jamesrhester@gmail.com> wrote:
> I had misunderstood Bob's proposal. Yes, I can see the benefit of an outer
> object with a single "CIF-JSON" key.

Do I understand correctly that the only benefit is that the "CIF-JSON"
string will be in the first bytes of the file?
It's still not enough to tell if JMol can handle this file. It may
contain a structure that JMol can show or structure factors that (I
guess) JMol can't show.
And once the JSON is parsed it's equally easy to check for the "CIF-JSON" key.

This isn't particularly an issue. The issue is registering this format relative to other JSON formats that Jmol *can* read.

 

The downside is one more layer of wrapping.
json["CIF-JSON"].block.item
vs
json.block.item

Yes, that's basically the cost. More that it requires one more object call:

cif = json["CIF-JSON"]
metadata = cif.Metadata
data = cif.["someDataBlockCode"]
...

instead of

cif = json
metadata = cif.Metadata
data = cif.["someDataBlockCode"]

I suggest it is worth the 14 bytes.

Bob

_______________________________________________
cif-developers mailing list
cif-developers@iucr.org
http://mailman.iucr.org/cgi-bin/mailman/listinfo/cif-developers

Reply to: [list | sender only]
International Union of Crystallography

Scientific Union Member of the International Council for Science (admitted 1947). Member of CODATA, the ICSU Committee on Data. Member of ICSTI, the International Council for Scientific and Technical Information. Partner with UNESCO, the United Nations Educational, Scientific and Cultural Organization in the International Year of Crystallography 2014.

ICSU Scientific Freedom Policy

The IUCr observes the basic policy of non-discrimination and affirms the right and freedom of scientists to associate in international scientific activity without regard to such factors as ethnic origin, religion, citizenship, language, political stance, gender, sex or age, in accordance with the Statutes of the International Council for Science.