nbd-wtf / go-nostr

Nostr library for Golang
MIT License
364 stars 102 forks source link

tags in filter are not JSON-serializable/deserializable #128

Closed rolznz closed 4 months ago

rolznz commented 4 months ago

https://github.com/nbd-wtf/go-nostr/blob/master/filter.go#L16

Is there any good reason for this? it means the filter struct cannot be easily used

fiatjaf commented 4 months ago

There is a custom Marshaler for the Filter struct made with easyjson. It wouldn't work with default json:"" tags-based serializers. We should actually remove these annotations from the struct.