Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Transaction serialization and deserialization #595

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

sappenin
Copy link
Collaborator

@sappenin sappenin commented Feb 16, 2025

Once #594 is merged, this PR improves test coverage of all Transaction sub-classes by adding enhanced JSON deserialization coverage for each flavor of each Transaction. For example the Payment transaction can be deserialized via at least three different mechanisms:

By pointing the Jackson ObjectMapper to a Transaction class (in which case, TransactionDeserializer will be engaged, delegating to the Immutable JSON implementation);
By pointing the Jackson ObjectMapper to a Payment class (in which case, the TransactionDeserialer will be skipped and the Transaction interface will be used, delegating to the to the Immutable JSON implementation);
By pointing the Jackson ObjectMapper to the Immutable implementation itself (e.g., an ImmutablePayment).
This PR adds this additional coverage to ensure proper JSON handling by future developers who may change certain aspects of each Transaction's Interface/Immutable or concrete deserializer without realizing that these changes might subtly affect deserialization based on other related classes.

(Note the large line-count of this PR is due to the addition of a Livenet ledger JSON file that will be merged as part of #590)

@sappenin sappenin changed the base branch from main to df/fixes-590 February 16, 2025 22:36
@sappenin sappenin changed the base branch from df/fixes-590 to main February 16, 2025 22:44
…ction-serde

# Conflicts:
#	xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/jackson/modules/TransactionDeserializer.java
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.

1 participant