Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Aug 3, 2023
1 parent a2284d1 commit a845f68
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public Predicate deserialize(JsonElement json, Type typeOfT, JsonDeserialization
if (obj.has("abs_before_epoch")) {
return new Predicate.AbsBefore(
new TimePoint(
new Uint64(new XdrUnsignedHyperInteger(obj.get("abs_before_epoch").getAsLong()))));
new Uint64(
new XdrUnsignedHyperInteger(obj.get("abs_before_epoch").getAsBigInteger()))));
} else if (obj.has("abs_before")) {
String formattedDate = obj.get("abs_before").getAsString();
return new Predicate.AbsBefore(
Expand All @@ -57,7 +58,8 @@ public Predicate deserialize(JsonElement json, Type typeOfT, JsonDeserialization

if (obj.has("rel_before")) {
return new Predicate.RelBefore(
new Duration(new Uint64(new XdrUnsignedHyperInteger(obj.get("rel_before").getAsLong()))));
new Duration(
new Uint64(new XdrUnsignedHyperInteger(obj.get("rel_before").getAsBigInteger()))));
}

throw new IllegalArgumentException("Unsupported predicate: " + json.toString());
Expand Down

0 comments on commit a845f68

Please sign in to comment.