strll opened a new issue, #8204:
URL: https://github.com/apache/seatunnel/issues/8204

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   在解析数组类型的json 还有格式化的json的时候不能正常解析
   比如
   [
     {
      name: "zhangsan",
       age:21
     },
     {
      name: "wangwu",
       age:22
     }
   ]
   当解析这种非单行的json的时候会报错
   这个问题我的解决方法在 
https://blog.csdn.net/qq_47431361/article/details/144222623?spm=1001.2014.3001.5502
 中有详细记录
   
这个问题导致的原因是org/apache/seatunnel/connectors/seatunnel/file/source/reader/JsonReadStrategy.java
 这个方法中读取文件流中的内容存在问题 当json的内容不在同一行中的时候就会导致这个问题
   我使用的方法是直接读取文件的所有内容 然后对json数据在进行格式化 将一个json对象格式化成一个String字符串 然后再传入原来的方法中  
这样虽然会浪费内存和运行时间 但是我也没有什么更好的方法了
   
   ### SeaTunnel Version
   
   2.3.8
   
   ### SeaTunnel Config
   
   ```conf
   内网开发 我无法提供Config
   使用的Config格式和官网中的相同
   ```
   
   
   ### Running Command
   
   ```shell
   使用Seatunnel的API接口 无命令
   ```
   
   
   ### Error Exception
   
   ```log
   工作原因 我无法直接提供报错信息
   当格式为
   [
     {
      name: "zhangsan",
       age:21
     },
     {
      name: "wangwu",
       age:22
     }
   ]
   这个样子的数据在解析的时候会报错 大致的内容是 读取"[" 的时候不能解析内容
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   8
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to