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

Externalise Erlang Term things (_revs, replication _ids) #54

Closed
janl opened this issue Feb 10, 2017 · 5 comments
Closed

Externalise Erlang Term things (_revs, replication _ids) #54

janl opened this issue Feb 10, 2017 · 5 comments

Comments

@janl
Copy link
Owner

janl commented Feb 10, 2017

No description provided.

@nolanlawson
Copy link

Prior discussion in Pouch: pouchdb/pouchdb#4642

@davisp
Copy link

davisp commented Feb 11, 2017

I just remembered that I wrote a Python JSON canonicalizer a long time ago. The basics are: sort keys when serializing, no added whitespace, strings are Unicode NFD normalized encoded in UTF-8, and floats are serialized using dtoa.c (or similarly compatible code, ie, 1.1 is printed as 1.1, not as 1.100000000000000088817842).

For strings I wonder if it'd be better to requiring anything that's non-ascii to be encoded using the \u escape sequences.

@davisp
Copy link

davisp commented Feb 11, 2017

I should probably add a link to the thing:

https://github.com/davisp/jsonical

@nolanlawson
Copy link

Yeah in JS a popular one is: https://github.com/substack/json-stable-stringify

@wohali
Copy link
Collaborator

wohali commented Aug 7, 2018

Migrated to apache/couchdb#1530

@wohali wohali closed this as completed Aug 7, 2018
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

4 participants