This commit is contained in:
Looly
2024-10-10 18:52:06 +08:00
parent 3e94c0a92d
commit ae1f3635ce
3 changed files with 212 additions and 120 deletions

View File

@@ -0,0 +1,16 @@
package org.dromara.hutool.json.issues;
import org.dromara.hutool.json.JSONArray;
import org.dromara.hutool.json.JSONUtil;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class IssueIAW0ITTest {
@Test
void jsonArrayToStringTest() {
final JSONArray jsonArray = JSONUtil.ofArray()
.addValue(JSONUtil.ofObj().putValue("value", 0).putValue("empty", false));
Assertions.assertEquals("[{\"value\":0,\"empty\":false}]", jsonArray.toString());
}
}