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

Allow case insensitive JSON tag matching #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cmaglie
Copy link

@cmaglie cmaglie commented May 4, 2022

The standard library encoding/json allows it by default.

Fix #237

The standard library `encoding/json` allows it by default.

Fix mailru#237
cmaglie added a commit to cmaglie/arduino-cli that referenced this pull request May 4, 2022
cmaglie added a commit to arduino/arduino-cli that referenced this pull request May 5, 2022
* Updated library_index.json for testing

* Use easyjson for parsing library_index

* Added benchmarks for json deconding.

Results:

$ go test -v -benchmem -bench BenchmarkIndexParsing github.com/arduino/arduino-cli/arduino/libraries/librariesindex
=== RUN   TestIndexer
--- PASS: TestIndexer (0.16s)
goos: linux
goarch: amd64
pkg: github.com/arduino/arduino-cli/arduino/libraries/librariesindex
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
BenchmarkIndexParsingStdJSON
BenchmarkIndexParsingStdJSON-8                 5         214872730 ns/op          94.52 MB/s    58956539 B/op     418973 allocs/op
BenchmarkIndexParsingEasyJSON
BenchmarkIndexParsingEasyJSON-8               16          69215472 ns/op         293.42 MB/s    56162664 B/op     418966 allocs/op
PASS
ok      github.com/arduino/arduino-cli/arduino/libraries/librariesindex 4.442s

easyjson is 3x faster.

* Updated license check cache

* Added easyjson to package_index.json parser

* Allow easyjson to match tags in case-insensitive

See mailru/easyjson#372

* Added easyjson generation task in Taskfile

* Added github action check

* Update .github/workflows/check-easyjson.yml

Co-authored-by: per1234 <[email protected]>

Co-authored-by: per1234 <[email protected]>
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

Successfully merging this pull request may close these issues.

Can EasyJSON support case insensitive match
1 participant