Remove deprecated JSON encoder/decoder and update dependencies
- Deleted the custom JSON encoder/decoder implementation in favor of the standard library's `encoding/json` package. - Removed the `next.orly.dev/pkg/encoders/json` package and its associated files. - Updated `go.mod` to remove the `github.com/nostr-dev-kit/ndk` dependency and bump the version of `lol.mleku.dev` from v1.0.3 to v1.0.4. - Cleaned up import statements across various files to reflect the removal of the custom JSON package. - Ensured that all references to the old JSON encoding/decoding methods are replaced with the standard library equivalents.
This commit is contained in:
@@ -24,9 +24,6 @@ import (
|
||||
// encode <, >, and & characters due to legacy bullcrap in the encoding/json
|
||||
// library. Either call MarshalJSON directly or use a json.Encoder with html
|
||||
// escaping disabled.
|
||||
//
|
||||
// Or import "next.orly.dev/pkg/encoders/json" and use json.Marshal which is the
|
||||
// same as go 1.25 json v1 except with this one stupidity removed.
|
||||
type E struct {
|
||||
|
||||
// ID is the SHA256 hash of the canonical encoding of the event in binary
|
||||
@@ -89,7 +86,7 @@ func (ev *E) Clone() *E {
|
||||
CreatedAt: ev.CreatedAt,
|
||||
Kind: ev.Kind,
|
||||
}
|
||||
|
||||
|
||||
// Deep copy all byte slices with independent memory
|
||||
if ev.ID != nil {
|
||||
clone.ID = make([]byte, len(ev.ID))
|
||||
@@ -107,7 +104,7 @@ func (ev *E) Clone() *E {
|
||||
clone.Sig = make([]byte, len(ev.Sig))
|
||||
copy(clone.Sig, ev.Sig)
|
||||
}
|
||||
|
||||
|
||||
// Deep copy tags
|
||||
if ev.Tags != nil {
|
||||
clone.Tags = tag.NewS()
|
||||
@@ -124,7 +121,7 @@ func (ev *E) Clone() *E {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return clone
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user