mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复isXXX转换时的匹配问题
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package cn.hutool.json;
|
||||
|
||||
import lombok.Data;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class IssueI6H0XFTest {
|
||||
@Test
|
||||
public void toBeanTest(){
|
||||
final Demo demo = JSONUtil.toBean("{\"biz\":\"A\",\"isBiz\":true}", Demo.class);
|
||||
Assert.assertEquals("A", demo.getBiz());
|
||||
Assert.assertEquals("{\"biz\":\"A\"}", JSONUtil.toJsonStr(demo));
|
||||
}
|
||||
|
||||
@Data
|
||||
static class Demo {
|
||||
String biz;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user