Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ARRAY and OBJECT markers #7

Closed
kxepal opened this issue Aug 11, 2012 · 2 comments
Closed

Change ARRAY and OBJECT markers #7

kxepal opened this issue Aug 11, 2012 · 2 comments
Milestone

Comments

@kxepal
Copy link
Collaborator

kxepal commented Aug 11, 2012

Short story:

Riyad Kalla had proposed to change ARRAY and OBJECT markers pairs A...E and O...E to [...] and {...} respectively.

This looks like a good idea for the next reasons:

  1. UBJSON becomes closer to his father, JSON.

  2. Since UBJSON is binary format, this change makes easy to read data in hex format:

    Draft 8 (v0.8) style:

    0000   4F 53 69 03 66 6F 6F 41    OSi.fooA
    0008   53 69 03 62 61 72 4F 53    Si.barOS
    0010   69 03 62 61 7A 69 2A 45    i.bazi*E
    0018   45 45                      EE
    

    new style:

    0000   7B 53 69 03 66 6F 6F 5B    {Si.foo[
    0008   53 69 03 62 61 72 7B 53    Si.bar{S
    0010   69 03 62 61 7A 69 2A 7D    i.bazi*}
    0018   5D 7D                      ]}
    

    Note, how easy to visual guess where end array or object.

  3. This change completely breaks backward compatibility that is already broken by other improvements(;

  4. Now we've got new type of errors as ending marker mismatch.

The main flaw of this change that it breaks pretty [ ] notation. However, as for me, if I'd like to work with binary data, I'll choose hex dump format. If I need to read the data, I prefer YAML one.

@AnyCPU
Copy link
Collaborator

AnyCPU commented Aug 26, 2012

Ref #6.

@ghost ghost self-assigned this Apr 14, 2013
@ghost
Copy link

ghost commented Apr 14, 2013

ACCEPTED

Merged into Draft 9 spec: http://ubjson.org/type-reference/

@ghost ghost closed this as completed Apr 14, 2013
@ghost ghost removed their assignment Aug 15, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants