[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: Tue, 16 May 2017 10:35:05 +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=YXg1Het4Js4bjdMRWzEZGUCRt0sYf4ZtPBIZX+fesXM=;b=obZqX2qUXZNIAYi9dR7Ccqk+3Ei+EolQP9AmVAg5xpLk+pPJmhAL30mO/gu09k2/Br7K5KcAldkkDosTfLuEK8tyBKwf6jSkKESDEf7zf7I8HHJbzL60g2XMcK18sUazu9rGfd0imhtEY2tMWaG1/TSitYEJVvAICM1M0MmzerxM5jRLCflKEHzzaeOwxw2/lOJj5AATywvYoz3rk9FMygIolEm4h4jaPyWAv6LPAYxUm4EdeCT2ypokrgaHfrHY2kLhC4R5ky3DGrCkfnnrGUQRgxF5yytJqkUgHV1c/ga2E/Fb91cBlEofLBxyokgHXZ3DKfjpNl6SZh6B3gFXbQ==
- In-Reply-To: <CAF_YUvUaJM0bwV4vKZwARQw4Q44LN+TOyr4Ghge3P_qn90tUHQ@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>
On 16 May 2017 at 04:16, Robert Hanson <hansonr@stolaf.edu> wrote:
Two points:
1. I do not understand the stripping of "data_" and "save_" from the names we have for these.
These are stripped as the data_ and save_ parts of the names perform a syntactical role in CIF, and the JSON curly brace essentially replaces their syntactical function of encapsulation. Put another way, requiring that datablock names started with 'data_' would be unnecessary additional baggage.
2. Save frames. What is the problem with just doing this?"data_another_block":{ "_abc":["xyz"], "save_internal":{"_abc":["yzx"
], "_r.fruit":["apple","pear"], "_r.colour":["red","green"]} }, }That is, why the special "frames" list?
Well, we could do it the way you suggest, perhaps with a capital 'S'. Is there any reason to prefer one over the other? I would have thought that putting all save frames under a single name would make processing a datablock slightly easier, as you don't have to check every block entry for the 'save_' sequence when running through a datablock, especially as these frames only occur in dictionaries. To get all save frames under the current spec you would just have to go something like:
defs = myjson['blockname']['frames']
but if you need them under your proposal you'd have to go something vaguely like:
defs = myjson['blockname']
save_names = defs.keys().filter(key[0:5] == "save_")
_______________________________________________
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]
- 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)
- 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):