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,13 +2,13 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"github.com/nbd-wtf/go-nostr/nip19"
|
||||
)
|
||||
@@ -69,7 +69,7 @@ func main() {
|
||||
if f, err := os.Create(filename); err == nil {
|
||||
fmt.Fprintf(os.Stderr, "returned events saved to %s\n", filename)
|
||||
// encode the returned events in a file
|
||||
enc := json.NewEncoder(f)
|
||||
enc := jsoniter.NewEncoder(f)
|
||||
enc.SetIndent("", " ")
|
||||
enc.Encode(evs)
|
||||
f.Close()
|
||||
|
Reference in New Issue
Block a user