husofskyzy opened a new issue #1839: URL: https://github.com/apache/incubator-linkis/issues/1839
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-linkis/issues) and found no similar feature requirement. ### Problem Description ### Jackson is used in some places and gson is used in some places. We decided to use Jackson uniformly #### 1. create JacksonUtils to make it simpler to use jackson #### 2. three types of convert 2.1 conver from object to jsonString JacksonUtils.toJson(); ```bash {"name":"tom","address":"beijing"} ``` 2.2 conver from object to jsonString and fromat jsonString JacksonUtils.toJsonFormat(); ```bash { "name": "tom", "address": "beijing" } ``` 2.3 conver from jsonString to object JacksonUtils.fromJson(); ------- ### 代码中有些地方用jackson,有些地方用gson,决定统一使用jackson #### 1. 创建 JacksonUtils 简化使用 jackson 的操作 #### 2. 三种转换类型 2.1 object 转 jsonString JacksonUtils.toJson(); ```bash {"name":"tom","address":"beijing"} ``` 2.2 object 转 jsonString 并且格式化 and fromat jsonString JacksonUtils.toJsonFormat(); ```bash { "name": "tom", "address": "beijing" } ``` 2.3 jsonString 转 object JacksonUtils.fromJson(); ### Description _No response_ ### Use case _No response_ ### solutions _No response_ ### Anything else _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@linkis.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@linkis.apache.org For additional commands, e-mail: dev-h...@linkis.apache.org