且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将xml转换为json android

更新时间:2023-02-04 08:39:41

我知道这已经很晚了,但是我只是想使其工作起来,所以就到这里了.请记住,这只是快速修复,而不是***实践.

I know this is late, but I just wanted to make it work so here you go. Keep in mind, this is just a quick fix and not best practice.

  1. 从Github-Repo下载所有文件: https://github.com/stleary/JSON-java
  2. 打开XMLTokener.java并注释掉第69、70、71行.
  3. 您完成了.请记住,如果未关闭CDATA,将不会引发任何错误,因此这不是***的解决方法,但至少可以使用.
  1. Download all the files from the Github-Repo: https://github.com/stleary/JSON-java
  2. Open XMLTokener.java and comment out line 69, 70, 71.
  3. You're done. Keep in mind, if the CDATA is not closed, no error will be thrown, so this isn't the best way to go, but at least it works.