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

Have options for shorthand syntax #10

Open
disordinary opened this issue Oct 30, 2014 · 4 comments
Open

Have options for shorthand syntax #10

disordinary opened this issue Oct 30, 2014 · 4 comments

Comments

@disordinary
Copy link

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

@ctranxuan
Copy link

👍

@sonnyp
Copy link

sonnyp commented Sep 14, 2015

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

@heruan
Copy link

heruan commented Nov 3, 2016

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!

@mitar
Copy link

mitar commented Oct 12, 2019

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants