@Test
    public void toJSONString() throws Exception {
        Assert.assertEquals(JSONUtils.toJSONString("xxx"), "\"xxx\"");
        Assert.assertEquals(JSONUtils.toJSONString(1), "1");
        Assert.assertEquals(JSONUtils.toJSONString(2.2d), "2.2");
        Assert.assertEquals(JSONUtils.toJSONString(false), "false");
        Assert.assertEquals(JSONUtils.toJSONString(new HashMap()), "{}");
        Assert.assertEquals(JSONUtils.toJSONString(new ArrayList()), "[]");
        Assert.assertEquals(JSONUtils.toJSONString(new Object[0]), "[]");
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/common/src/test/java/com/alipay/sofa/rpc/common/utils/JSONUtilsTest.java