mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-09-17 19:13:56 +02:00
replace all ocurrences of encoding/json with json-iterator so we get rid of HTML escaping and hopefully get faster too.
This commit is contained in:
@@ -2,11 +2,11 @@ package nip11
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
)
|
||||
|
||||
@@ -43,7 +43,7 @@ func Fetch(ctx context.Context, u string) (info RelayInformationDocument, err er
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if err := json.NewDecoder(resp.Body).Decode(&info); err != nil {
|
||||
if err := jsoniter.NewDecoder(resp.Body).Decode(&info); err != nil {
|
||||
return info, fmt.Errorf("invalid json: %w", err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user