Skip to content

Conversation

@avlo
Copy link
Collaborator

@avlo avlo commented Jun 13, 2024

TagDeserializer deserialization logic refactored (and cleaned up) into the following classes, which extend BaseTag (as opposed to their previously being accommodated as GenericTags).

Eachs' deserialization is now polymorphic (i.e., deserialization logic is implemented by each class as per its specific need):

  nostr-java-event/src/main/java/nostr/event/tag/EventTag.java
  nostr-java-event/src/main/java/nostr/event/tag/GeohashTag.java
  nostr-java-event/src/main/java/nostr/event/tag/HashtagTag.java
  nostr-java-event/src/main/java/nostr/event/tag/NonceTag.java
  nostr-java-event/src/main/java/nostr/event/tag/PriceTag.java
  nostr-java-event/src/main/java/nostr/event/tag/PubKeyTag.java
  nostr-java-event/src/main/java/nostr/event/tag/RelaysTag.java
  nostr-java-event/src/main/java/nostr/event/tag/SubjectTag.java

additionally:

  • GenericTag additional constructor with List parameter (as opposed to just variad String...) and cleanup.
  • unit tests for all the above

Comment/suggest/deliberation/etc on this PR are welcome, otherwise I will merge ~48hours from now (Saturday, June 15 2024, 01:15:30 2024 UTC)

@tcheeric tcheeric mentioned this pull request Jun 14, 2024
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@tcheeric tcheeric merged commit b25ff9c into tcheeric:develop Jun 14, 2024
@tcheeric
Copy link
Owner

Merged, thanks.

@avlo avlo deleted the deserializer_refactor branch September 7, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants