Skip to content

Have options for shorthand syntax #10

Open

Description

@disordinary

Full words create needless storage or network traffic, if I had to send thousands of patches through a network connection, or store millions of them in a database I'm wasting allot of bytes needlessly.

So having the ability to have shortened operators and keys would be beneficial something like:
replace = rp
remove = rm
copy = cp
move = mv

path = pth
value = val

etc

Activity

  1. ctranxuan commented on Sep 14, 2015

    @ctranxuan

    👍

  2. sonnyp commented on Sep 14, 2015

    @sonnyp

    I don't think we need to add this to the spec.
    Nothing prevents you from using your own serializer/parser see https://github.com/JSON8/patch#patch-size

    Also for millions of items you'd probably go with some + efficient binary format

  3. heruan commented on Nov 3, 2016

    @heruan

    I agree, this should not be part of the spec. Both network traffic and database values could be compressed (e.g. HTTP Accept-Encoding: gzip, deflate) which would compress your data even more than that!

  4. mitar commented on Oct 12, 2019

    @mitar

    Yes, such optimizations are at the wrong layer. No need to complicate the patch format to optimize here. Because it is not just about keys, but also about values, they can also be duplicated many times. Compression solves all those problems at once. Many transport formats and databases support compression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions