mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package cn.hutool.json.xml;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.XML;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class Issue3560Test {
|
||||
@Test
|
||||
public void toJSONObjectTest() {
|
||||
String inPara= "<ROOT><ID>002317479934367853</ID><CONTENT><![CDATA[asdfadf&21sdgzxv&aasfasf]]></CONTENT></ROOT>";
|
||||
JSONObject json = XML.toJSONObject(inPara, true);
|
||||
Assert.assertEquals("{\"ROOT\":{\"ID\":\"002317479934367853\",\"CONTENT\":\"asdfadf&21sdgzxv&aasfasf\"}}", json.toString());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user