skip to Main Content

How can I make \u be u in generated JSON?

public void run(String... args) throws Exception { final ObjectMapper jackson = new ObjectMapper(); final ObjectNode objectNode = jackson.createObjectNode(); String text = "Simplified Chinese 简体中文"; final String escapedInUnicodeText = StringEscapeUtils.escapeJava(text); System.out.println(escapedInUnicodeText); //output is: Simplified Chinese u7B80u4F53u4E2Du6587 objectNode.put("text", escapedInUnicodeText); System.out.println(jackson.writeValueAsString(objectNode)); //output is…

VIEW QUESTION

NLog override level use JSON configuration

I have Asp.NET Core application that uses a third-party library that outputs messages with the INFO information level: _logger.LogInformation("About information..."); This is about how the log display is configured (I use a JSON configuration): { "NLog": { "targets": { "console":…

VIEW QUESTION
Back To Top
Search