public void testJson() { ObjectMapper mapper = new ObjectMapper(); try { String htmlString = mapper.readValue("<!Doctype>", String.class); } catch (IOException e) { e.printStackTrace(); } }com.fasterxml.jackson.core.JsonParseException:意外的字符('<'(代碼 60)):在 [Source] 處需要一個有效值(數字、字符串、數組、對象、'true'、'false' 或 'null') : (細繩)””;如何解決這個問題?
無法使用 objectmapper 從 html 字符串讀取值
12345678_0001
2023-09-06 15:42:37