replace encoding/json with json-iterator everywhere so we get rid of HTML encoding and maybe be faster.

This commit is contained in:
fiatjaf
2024-12-03 00:42:41 -03:00
parent 932361fe8f
commit fd5cd55f6f
12 changed files with 19 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"slices"
"strings"
"time"
@@ -12,7 +13,6 @@ import (
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip13"
"github.com/nbd-wtf/go-nostr/nip19"
"golang.org/x/exp/slices"
)
const (
@@ -276,7 +276,7 @@ example:
// print event as json
var result string
if c.Bool("envelope") {
j, _ := easyjson.Marshal(nostr.EventEnvelope{Event: evt})
j, _ := json.Marshal(nostr.EventEnvelope{Event: evt})
result = string(j)
} else {
j, _ := easyjson.Marshal(&evt)