mirror of
https://github.com/tendermint/tendermint.git
synced 2026-05-12 18:21:31 +00:00
Delete the custom libs/json (tmjson) package. (#7673)
There are no further uses of this package anywhere in Tendermint. All the uses in the Cosmos SDK are for types that now work correctly with the standard encoding/json package.
This commit is contained in:
@@ -9,13 +9,13 @@ package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/tendermint/tendermint/internal/consensus"
|
||||
tmjson "github.com/tendermint/tendermint/libs/json"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -56,7 +56,7 @@ func main() {
|
||||
}
|
||||
|
||||
var msg consensus.TimedWALMessage
|
||||
err = tmjson.Unmarshal(msgJSON, &msg)
|
||||
err = json.Unmarshal(msgJSON, &msg)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("failed to unmarshal json: %w", err))
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/tendermint/tendermint/internal/consensus"
|
||||
tmjson "github.com/tendermint/tendermint/libs/json"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -37,7 +37,7 @@ func main() {
|
||||
panic(fmt.Errorf("failed to decode msg: %w", err))
|
||||
}
|
||||
|
||||
json, err := tmjson.Marshal(msg)
|
||||
json, err := json.Marshal(msg)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("failed to marshal msg: %w", err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user