Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

enhancement: replace stdlib json by jsoniter #358

Open
fredbi opened this issue Sep 3, 2019 · 2 comments · May be fixed by #357
Open

enhancement: replace stdlib json by jsoniter #358

fredbi opened this issue Sep 3, 2019 · 2 comments · May be fixed by #357

Comments

@fredbi
Copy link
Contributor

fredbi commented Sep 3, 2019

github.com/json-iterator/go is currently one of the fastest libs available to process json.
Besides, it is a simple drop-in replacement for the standard lib, without much code change.

I am proposing PR #357 to validate the concept and expose benchmarks on signing and parsing methods.

NOTE: due to some changes in the order of marshalled claims, testable examples verifying the value of the signed string have been adapted to check for decoded claims instead.

@fredbi fredbi linked a pull request Sep 3, 2019 that will close this issue
@saltbo
Copy link

saltbo commented Sep 5, 2019

expected!

@fredbi
Copy link
Contributor Author

fredbi commented Sep 6, 2019

Attention: notice that this breaks compatibility with older golang versions.
I don't think that keeping a compatibility promise back to versions older than 1.7 brings much value.
This PR imposes golang 1.7+.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants