mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
17
hutool-json/src/test/java/cn/hutool/json/Issue2507Test.java
Executable file
17
hutool-json/src/test/java/cn/hutool/json/Issue2507Test.java
Executable file
@@ -0,0 +1,17 @@
|
||||
package cn.hutool.json;
|
||||
|
||||
import cn.hutool.core.lang.Console;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
public class Issue2507Test {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void xmlToJsonTest(){
|
||||
String xml = "<MsgInfo> <Msg> <![CDATA[<msg><body><row action=\"select\"><DIET>低盐饮食[嘱托]]><![CDATA[]</DIET></row></body></msg>]]> </Msg> <Msg> <![CDATA[<msg><body><row action=\"select\"><DIET>流质饮食</DIET></row></body></msg>]]> </Msg> </MsgInfo>";
|
||||
JSONObject jsonObject = JSONUtil.xmlToJson(xml);
|
||||
|
||||
Console.log(jsonObject.toStringPretty());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user