Discussion List Archives

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

Re: Anyone want to write a JSON schema for CIF-JSON?

I modified my converter to conform to the current CIF-JSON draft andtested the schema a bit. I got one error:
Message:Array item count 0 is less than minimum count of 1.
This was for empty loop:
which I assumed should be converted to empty array:
"_nop": []
OTOH empty loops could be just skipped, this is not explicit in the draft.
Apart from this the schema works for me.Just note that the draft has URI ending with cif-json.txt and in theschema it's cif-json.json.
On 19 June 2017 at 03:41, James Hester <jamesrhester@gmail.com> wrote:> Dear CIF developers,>> I have no experience with JSON schemas so will defer to others here on the> correctness of the draft.>> On 14 June 2017 at 04:15, Bollinger, John C <John.Bollinger@stjude.org>> wrote:>>>> Dear CIF Developers,>>>>>>>> I’ve got this.  In fact, here’s a first draft:>>>>>>>> ====>> [Edited out]>>>> ====>>>>>>>> Comments:>>>>>>>> 1. This schema is itself valid against the latest draft (#6) of the JSON>> metaschema, as indeed it declares of itself.  At this time, however, there>> is not yet a final specification for JSON schema.>>>>>>>> 2. I have specified the schema’s "id" URI as>> "http://www.iucr.org/resources/cif/cif-json.json", which differs slightly>> from the schema URI presented in the example accompanying the CIF-JSON>> specification, and I have furthermore specified in the schema that this>> revised URI is the one that should be presented in instance documents as the>> "schema-uri" metadata item (when that is present).>>> OK.>>>>>>>> 3. This schema does not -- and as far as I can determine *cannot* -->> express the requirement that various CIF identifier strings be presented in>> Unicode case-normal form.  I provide a considerably weaker criterion.>>> I suggest that we indicate in the CIF-JSON standard document "Comments"> section that conformance with the schema is a necessary, but not sufficient,> condition for a given JSON object to be conformant, and then list the> additional requirements (case normal form, more restricted characterset - is> that all?)>>>>>>>> 4. Additionally, this version of the schema does not fully express the CIF>> character set restrictions.  It could do a little better with a little more>> work, but because Javascript works with 16-bit code units instead of code>> _points_, fully expressing the limitations will be trickier and uglier.>>> It looks like this schema covers a superset of the allowed code points. If> so, we can add the additional restrictions into the list of additional> conformance requirements.>>>>>>>> 5. This schema validates the defined Metadata properties, but also allows>> arbitrary Metadata properties.  This is open to discussion -- it would not>> be hard for the schema to instead permit only the four specification-defined>> properties.>>> I would prefer restricting these only to the properties defined in the> specification, to make it clear that users should not customise this object.>>>>>>>> 6. The specification says that the "schema-version" metadata item>> expresses a version number conforming to semantic versioning.  Accordingly,>> the schema requires the value of this item to be a dot-delimited triplet of>> non-negative integers without leading zeroes.  The example CIF accompanying>> the specification is not valid against the schema in this respect.>>>>>> OK, I've fixed this.>>>>> You can test this schema or your own at https://jsonschemalint.com/>>>>>>>>>>>> John>>>>>>>> -->>>> John C. Bollinger, Ph.D.>>>> Computing and X-Ray Scientist>>>> Department of Structural Biology>>>> St. Jude Children's Research Hospital>>>> John.Bollinger@StJude.org>>>> (901) 595-3166 [office]>>>> www.stjude.org>>>>>>>>>>>>>>>> From: cif-developers [mailto:cif-developers-bounces@iucr.org] On Behalf Of>> James Hester>> Sent: Tuesday, June 13, 2017 2:52 AM>> To: Forum for CIF software developers <cif-developers@iucr.org>>> Subject: Anyone want to write a JSON schema for CIF-JSON?>>>>>>>> Dear CIF Developers,>>>> COMCIFS have not so far raised any technical criticisms of our CIF-JSON>> document, which is a good sign that it will be approved without change once>> the 6-week comment period expires.  Given that it is unlikely to change,>> would anyone here like to now volunteer to put together a JSON schema for>> the standard?>>>> James.>>>>>> -->>>> T +61 (02) 9717 9907>> F +61 (02) 9717 3145>> M +61 (04) 0249 4148>>>>>> ________________________________>>>> Email Disclaimer: www.stjude.org/emaildisclaimer>> Consultation Disclaimer: www.stjude.org/consultationdisclaimer>>>> _______________________________________________>> cif-developers mailing list>> cif-developers@iucr.org>> http://mailman.iucr.org/cgi-bin/mailman/listinfo/cif-developers>>>>>> --> T +61 (02) 9717 9907> F +61 (02) 9717 3145> M +61 (04) 0249 4148>> _______________________________________________> cif-developers mailing list> cif-developers@iucr.org> http://mailman.iucr.org/cgi-bin/mailman/listinfo/cif-developers>_______________________________________________cif-developers mailing listcif-developers@iucr.orghttp://mailman.iucr.org/cgi-bin/mailman/listinfo/cif-developers

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

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

International Science Council 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.