Skip to content

Commit

Permalink
Serialize long types as Strings to avoid float64 conversion (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm authored Oct 17, 2023
1 parent fa5e5ba commit c46d8f9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;
import java.util.List;

Expand All @@ -27,9 +29,11 @@ public enum JobStatus {
private JobStatus status;

@JsonProperty(value = "submit_time")
@JsonSerialize(using = ToStringSerializer.class)
private long submitTime;

@JsonProperty(value = "end_time")
@JsonSerialize(using = ToStringSerializer.class)
private long finishedTime;

@JsonProperty(value = "error")
Expand All @@ -40,6 +44,7 @@ public static class StatusChange {
String status;

@JsonProperty(value = "change_time")
@JsonSerialize(using = ToStringSerializer.class)
long changeTime;

@JsonProperty(value = "message")
Expand Down

0 comments on commit c46d8f9

Please sign in to comment.