Skip to content

Commit deee0ab

Browse files
committed
Use easyjson for parsing library_index
1 parent e29b3b0 commit deee0ab

File tree

4 files changed

+528
-2
lines changed

4 files changed

+528
-2
lines changed

arduino/libraries/librariesindex/json.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
package librariesindex
1717

1818
import (
19-
"encoding/json"
2019
"fmt"
2120

2221
"github.com/arduino/arduino-cli/arduino/resources"
2322
"github.com/arduino/arduino-cli/i18n"
2423
"github.com/arduino/go-paths-helper"
24+
easyjson "github.com/mailru/easyjson"
2525
semver "go.bug.st/relaxed-semver"
2626
)
2727

@@ -64,7 +64,7 @@ func LoadIndex(indexFile *paths.Path) (*Index, error) {
6464
}
6565

6666
var i indexJSON
67-
err = json.Unmarshal(buff, &i)
67+
err = easyjson.Unmarshal(buff, &i)
6868
if err != nil {
6969
return nil, fmt.Errorf(tr("parsing library_index.json: %s"), err)
7070
}

0 commit comments

Comments
 (0)