Please disregard last email.

Allen Jones
Director - Digital Library Programs
The New School Libraries


On May 13, 2010, at 2:00 PM, Jonathan Rochkind <rochk...@jhu.edu> wrote:

JSON and XML as structures have 'order' in exactly analagous ways. In the case of Json, if you want to encode order you should use an array, not a dictionary, of course. Whether the particular software _parsing_ or _translating_ either Json or XML will go through it in order and preserve the order when translating to another format... is another question. Is there reason to think that software dealing with Json will be more likely to do this wrong than software dealing with xml? I don't get it.

Kyle Banerjee wrote:
Huh? JSON arrays preserve element order just like XML preserves element order. Combining JSON labeled arrays and objects provide you with the
same mechanisms available in markup languages such as XML.



Maybe I'm getting mixed up but is it not unsafe to assume that element order will be preserved in all environments in for/foreach loops where the JSON might be interpreted unless you specifically iterate through elements in order? If I'm wrong, this is a total nonissue. Otherwise, there could be
side effects.

Don't get me wrong. JSON's a better way to go in general, and I think that too much the focus on lossless preservation of the MARC record has a really held us back. Given that significant portions of the MARC record are not used for search, retrieval, or display, and many useful elements consist of free text, faithfully preserving each field as an object to encode elements such as extent of item or notes strikes me like using a chain saw to cut
butter.

kyle


Reply via email to