mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-24 07:13:09 -06:00
convert remaining uses of encoding/json to jsoniter
This commit is contained in:
parent
1f2d7d61e2
commit
8e922fb3c6
|
|
@ -15,7 +15,7 @@
|
||||||
package routing
|
package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
json "github.com/json-iterator/go"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
json "github.com/json-iterator/go"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
stdjson "encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
json "github.com/json-iterator/go"
|
json "github.com/json-iterator/go"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
@ -56,7 +55,7 @@ func Send(
|
||||||
}
|
}
|
||||||
|
|
||||||
var txnEvents struct {
|
var txnEvents struct {
|
||||||
PDUs []stdjson.RawMessage `json:"pdus"`
|
PDUs []json.RawMessage `json:"pdus"`
|
||||||
EDUs []gomatrixserverlib.EDU `json:"edus"`
|
EDUs []gomatrixserverlib.EDU `json:"edus"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
json "github.com/json-iterator/go"
|
||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ package consumers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
stdjson "encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
json "github.com/json-iterator/go"
|
json "github.com/json-iterator/go"
|
||||||
|
|
||||||
|
|
@ -121,7 +120,7 @@ func (t *OutputEDUConsumer) onSendToDeviceEvent(msg *sarama.ConsumerMessage) err
|
||||||
Sender: ote.Sender,
|
Sender: ote.Sender,
|
||||||
Type: ote.Type,
|
Type: ote.Type,
|
||||||
MessageID: util.RandomString(32),
|
MessageID: util.RandomString(32),
|
||||||
Messages: map[string]map[string]stdjson.RawMessage{
|
Messages: map[string]map[string]json.RawMessage{
|
||||||
ote.UserID: {
|
ote.UserID: {
|
||||||
ote.DeviceID: ote.Content,
|
ote.DeviceID: ote.Content,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ package queue
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
json "github.com/json-iterator/go"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package storage_test
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/ed25519"
|
"crypto/ed25519"
|
||||||
"encoding/json"
|
json "github.com/json-iterator/go"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue