[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
--
Reply to: [list | sender only]
Re: CIF-JSON draft 2017-05-15
- Subject: Re: CIF-JSON draft 2017-05-15
- From: James Hester <jamesrhester@xxxxxxxxx>
- Date: Fri, 19 May 2017 11:37:06 +1000
- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;h=mime-version:in-reply-to:references:from:date:message-id:subject:to;bh=Bw6CrWqg66jjfoTv7OrlL8lAJq9PEWOzEusMBnfspaw=;b=T5YY5Y1d98cwcuHUY+t1lCAMSkwvskFiBwVoGNJloI2BAOCnVEdlikcOpwcpxWGRCDBLFrKGvMtTyzPlQ2PMPoyqyhaLfHTMLaJr4l/b0HSuUaEW66umP02FaDVi+nW3nO2QOTWqvQwypMPUF1X4YZaBN8114cgOn12WBX85ahHOt4ctDWwU5Z0mLPT6CVmu7px/94LI5B/gSJ/CJQJeV5OO6qsjkDtuobap56EpMCDG5e6Ag+4EDCdiJ2So6bUjBHidt233yeCdiu2Z4c9nmO870/eGaBD4R/swT7/zoqXurAGCUpFKg6DnJ9aUvlD3sewZzKPMUX8rnpDiZg9p+g==
- In-Reply-To: <CAF_YUvXYCLN8gAjDZndba1UCgsgvRTavHKJR28VqAG2Hh4xSVQ@mail.gmail.com>
- References: <CAM+dB2cAAY3CjC741WU0GqaWmAi2iGHtwZ82iA1bCwuNoG6nQg@mail.gmail.com><CAF_YUvVa0JXgAN9Bec6fjd6Nmco5W7EHWLN=Ba=daRR9U-2PzQ@mail.gmail.com><CACaHzQVYeOfS9zTe4gDJMVNCTgxtat0zhMAd2EMX=etXj5g2Gw@mail.gmail.com><CAF_YUvWV3huhwoBuCOkKXqCcYH+8kjFCPjoa=j_v61JC4H32Jg@mail.gmail.com><CAF_YUvUMbVz2j5=XXD5WD3G+0XB4tY=r1zwXuADB14qQNZTPvg@mail.gmail.com><CAF_YUvXPj9g6CEnsKmwZwrp7p550nyykrnQY9iN5wpEnDzrrYQ@mail.gmail.com><CAF_YUvUaJM0bwV4vKZwARQw4Q44LN+TOyr4Ghge3P_qn90tUHQ@mail.gmail.com><CAF_YUvUGexW-7iSfJWQ_c=WZNnbzBJeFaNfzKRVK4DKmdydp+A@mail.gmail.com><CAM+dB2dY8xEp8BeSJfXD5E9+H6-qkBCodMV_gc-fetLNp=x_WA@mail.gmail.com><CAF_YUvU+O3yb-JG_zZWvTW0i7EuzA1_J3c0Q8drWqb6rScSkEw@mail.gmail.com><CAF_YUvWT4ZGT_BbpmB2G3Ya7ttzj70qXD7UofyAsPb010W_XJw@mail.gmail.com><CAF_YUvXb4jbKxSh=Q9Q76Zay-RMi8xXU_geQ5FB76cj5iozkOQ@mail.gmail.com><CAF_YUvW01EL98PYcAq0fADvF9BK6oJTdhe4Ju9byg5x5bmGc2Q@mail.gmail.com><CAM+dB2fz+Y45c+Cgk7BABsSPQB2FKe9JxX2j+fRgPC+ehh-ddw@mail.gmail.com><CAF_YUvWnEq0XsQCUhh3bis=vukuf3BQF=QxGi8HS5rTpc4uvkw@mail.gmail.com><CACaHzQUhG8ndiKBSX3OeB=vkn3pu+DugJ=wCEz8podKstFsQZA@mail.gmail.com><CAF_YUvUhv1Li3b-oLkASzq7SnV734WEozPWnMMcHAbVhOcT_Jg@mail.gmail.com><CACaHzQXm3Lti+cP_mQDFnkPdN1ia=--RmGTnPOOyYqP3doJTZw@mail.gmail.com><CAF_YUvXi_UgN9Fc+MATbP-ROKyG31fjcc4HcoS7UEs+2jh3CYA@mail.gmail.com><CAF_YUvXYCLN8gAjDZndba1UCgsgvRTavHKJR28VqAG2Hh4xSVQ@mail.gmail.com>
I had misunderstood Bob's proposal. Yes, I can see the benefit of an outer object with a single "CIF-JSON" key. I'll add that to the next draft if there are no objections.
Concatenation: The CCDC (I speculate) are simply physically concatenating CIF files, which produces a syntactically correct file and is really efficient as there is no need to parse the contents. Of course, this fails to meet the standards if data blocks happen to have the same names, and could only be fixed by completely parsing every file to identify and possibly change data block names. In contrast, concatenation of JSON objects does not produce a syntactically correct string, so would not be attempted in the first place and is not something we need to guard against. Our concatenator is more likely to attempt "[" + A + "," + B +"]" to produce an array of objects. Now, the concept "a JSON array of CIF-JSON objects" is perfectly well-defined, and so is a viable method of data transfer without any intervention from us. Therefore, I don't think we need to include it in the standard, but we could comment that such an array would be the preferred way to transfer multiple CIF-JSON objects (to state the obvious).James.
On 17 May 2017 at 22:11, Robert Hanson <hansonr@stolaf.edu> wrote:
it is highly probable that this white space would be minimal, and that certainly within the first N finite number of characters we would see "CIF-JSON"."CIF-JSON":My proposal is that everything we have been talking about {...} be wrapped by a self-identifying object with the single item "CIF-JSON":So while it is possible that there will be white-space:
{"CIF-JSON":{....}}
{
{....}
}Or, if a reader does need to read the entire file to process any JSON data of any sort instead of streaming the data (Jmol might do this, too), then at least we know that the outer object will have a single key, and that key will be "CIF-JSON".It occurs to me that we could then also allow concatenation such as:[
{"CIF-JSON":{...}}
,
{"CIF-JSON":{...}}
,
{"CIF-JSON":{...}}
,
...
]This would allow services such as COD to easily deliver multiple CIF-JSON structures without worrying about what the CCDC fails to do -- modify the data_ lines when concatenating.Bob
_______________________________________________
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
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
Reply to: [list | sender only]
- Follow-Ups:
- RE: CIF-JSON draft 2017-05-15 (Matthew Towler)
- Re: CIF-JSON draft 2017-05-15 (Marcin Wojdyr)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- References:
- CIF-JSON draft 2017-05-15 (James Hester)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Marcin Wojdyr)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (James Hester)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (James Hester)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Marcin Wojdyr)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Marcin Wojdyr)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Re: CIF-JSON draft 2017-05-15 (Robert Hanson)
- Prev by Date: Re: CIF-JSON draft 2017-05-15
- Next by Date: Re: CIF-JSON draft 2017-05-15
- Prev by thread: Re: CIF-JSON draft 2017-05-15
- Next by thread: Re: CIF-JSON draft 2017-05-15
- Index(es):