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

Encoding #1

Open
thehowl opened this issue Feb 5, 2016 · 2 comments
Open

Encoding #1

thehowl opened this issue Feb 5, 2016 · 2 comments

Comments

@thehowl
Copy link

thehowl commented Feb 5, 2016

As more powerful encodings may come in the future, I thought about a new key in the json object, e, which specifies the encoding of the object, using a two character string:

  • The first character representing the actual encoding of bytes. i.e. a for base64, b for base65536, - if just sending raw bytes with no encoding in the middle
  • The second one representing compression, allowing for gzip compression right in the client.

Whaddya think?

@pixeldesu
Copy link
Member

why not using a v or r key that specifies the revision used and the clients adapting to that?

like for now, this would be the following:

  • "r": 1 would be the initial base64 encoding
  • "r": 2 would be the hacky binary -> base64 -> base65536 fallback for the Ruby client
  • "r": 3 would be base65536 encoding

@thehowl
Copy link
Author

thehowl commented Feb 5, 2016

I thought about that previously, too. The main issue is that I think it should be possible to allow a client to choose between gzip-encoding or not. Basically, this issue implies the possibility for a client/library to automagically gzip and have the client on the other side automatically decompress without having the end user to do any compression/decompression (much like gzip on HTTP)

Anyway, either r or the one I proposed in OP, we need to have a versioning system in the JSON itself.

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

2 participants