convert remaining uses of encoding/json to jsoniter

This commit is contained in:
bn4t 2020-10-09 16:26:41 +02:00
parent 1f2d7d61e2
commit 8e922fb3c6
7 changed files with 7 additions and 9 deletions

View file

@ -15,7 +15,7 @@
package routing
import (
"encoding/json"
json "github.com/json-iterator/go"
"fmt"
"net/http"
"strconv"

View file

@ -16,7 +16,7 @@ package routing
import (
"context"
"encoding/json"
json "github.com/json-iterator/go"
"net/http"
"time"

View file

@ -16,7 +16,6 @@ package routing
import (
"context"
stdjson "encoding/json"
"fmt"
json "github.com/json-iterator/go"
"net/http"
@ -56,7 +55,7 @@ func Send(
}
var txnEvents struct {
PDUs []stdjson.RawMessage `json:"pdus"`
PDUs []json.RawMessage `json:"pdus"`
EDUs []gomatrixserverlib.EDU `json:"edus"`
}

View file

@ -2,7 +2,7 @@ package routing
import (
"context"
"encoding/json"
json "github.com/json-iterator/go"
"fmt"
"reflect"
"testing"

View file

@ -16,7 +16,6 @@ package consumers
import (
"context"
stdjson "encoding/json"
"fmt"
json "github.com/json-iterator/go"
@ -121,7 +120,7 @@ func (t *OutputEDUConsumer) onSendToDeviceEvent(msg *sarama.ConsumerMessage) err
Sender: ote.Sender,
Type: ote.Type,
MessageID: util.RandomString(32),
Messages: map[string]map[string]stdjson.RawMessage{
Messages: map[string]map[string]json.RawMessage{
ote.UserID: {
ote.DeviceID: ote.Content,
},

View file

@ -16,7 +16,7 @@ package queue
import (
"context"
"encoding/json"
json "github.com/json-iterator/go"
"fmt"
"sync"
"time"

View file

@ -3,7 +3,7 @@ package storage_test
import (
"context"
"crypto/ed25519"
"encoding/json"
json "github.com/json-iterator/go"
"fmt"
"os"
"testing"