Skip to content

Commit

Permalink
use standard GSON output (#3284)
Browse files Browse the repository at this point in the history
  • Loading branch information
lanking520 committed Jun 27, 2024
1 parent e00ed01 commit 8d665c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/main/java/ai/djl/ndarray/BytesSupplierImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class BytesSupplierImpl implements BytesSupplier {
public byte[] getAsBytes() {
if (buf == null) {
if (value == null) {
value = JsonUtils.GSON_PRETTY.toJson(obj) + '\n';
value = JsonUtils.GSON.toJson(obj) + '\n';
}
buf = value.getBytes(StandardCharsets.UTF_8);
}
Expand All @@ -52,7 +52,7 @@ public byte[] getAsBytes() {
public String getAsString() {
if (value == null) {
if (obj != null) {
value = JsonUtils.GSON_PRETTY.toJson(obj) + '\n';
value = JsonUtils.GSON.toJson(obj) + '\n';
} else {
value = new String(buf, StandardCharsets.UTF_8);
}
Expand Down

0 comments on commit 8d665c1

Please sign in to comment.