You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by lz...@apache.org on 2022/09/07 02:40:09 UTC
[flink-table-store] branch master updated: [FLINK-29213] Pretty schema json file
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git
The following commit(s) were added to refs/heads/master by this push:
new 84850d24 [FLINK-29213] Pretty schema json file
84850d24 is described below
commit 84850d24de119531bd419313ec541cb2a3e92616
Author: MOBIN <99...@qq.com>
AuthorDate: Wed Sep 7 10:40:03 2022 +0800
[FLINK-29213] Pretty schema json file
This closes #287
---
.../java/org/apache/flink/table/store/file/utils/JsonSerdeUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/JsonSerdeUtil.java b/flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/JsonSerdeUtil.java
index ee055223..b7d452ce 100644
--- a/flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/JsonSerdeUtil.java
+++ b/flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/JsonSerdeUtil.java
@@ -63,7 +63,7 @@ public class JsonSerdeUtil {
public static <T> String toJson(T t) {
try {
- return OBJECT_MAPPER_INSTANCE.writer().writeValueAsString(t);
+ return OBJECT_MAPPER_INSTANCE.writerWithDefaultPrettyPrinter().writeValueAsString(t);
} catch (JsonProcessingException e) {
throw new UncheckedIOException(e);
}