Skip to content

Commit

Permalink
modify toJson to use a type hierarchy adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
U65535F committed Feb 28, 2025
1 parent d0d8c75 commit c0eb41a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/haveno/core/payment/PaymentAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ public void revertChanges() {
// ---------------------------- SERIALIZATION -----------------------------

public String toJson() {
Gson gson = gsonBuilder
.registerTypeAdapter(PaymentAccount.class, new PaymentAccountTypeAdapter(this.getClass()))
.create();
Gson gson = new GsonBuilder()
.registerTypeHierarchyAdapter(PaymentAccount.class, new PaymentAccountTypeAdapter(this.getClass()))
.create();
return gson.toJson(this);
}

Expand Down

0 comments on commit c0eb41a

Please sign in to comment.