skip to Main Content

Why String ""[]"" is a valid json?

Why fastjson and Jackson both judge the string ""[]"" a valid JSON? @Test public void validJSON() { String jsonString1 = ""[]""; System.out.println("fastjson: " + JSON.isValid(jsonString1)); ObjectMapper objectMapper = new ObjectMapper(); boolean flag = false; try { JsonNode jsonNode1 = objectMapper.readTree(jsonString1);…

VIEW QUESTION
Back To Top
Search