mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add test
This commit is contained in:
parent
483abdb76f
commit
a6f6d60283
@ -0,0 +1,14 @@
|
||||
package org.dromara.hutool.json.xml;
|
||||
|
||||
import org.dromara.hutool.json.JSONObject;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class Issue3560Test {
|
||||
@Test
|
||||
public void toJSONObjectTest() {
|
||||
final String inPara= "<ROOT><ID>002317479934367853</ID><CONTENT><![CDATA[asdfadf&21sdgzxv&aasfasf]]></CONTENT></ROOT>";
|
||||
final JSONObject json = JSONXMLUtil.toJSONObject(inPara, ParseConfig.of().setKeepStrings(true));
|
||||
Assertions.assertEquals("{\"ROOT\":{\"ID\":\"002317479934367853\",\"CONTENT\":\"asdfadf&21sdgzxv&aasfasf\"}}", json.toString());
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user