Jackson serializes the string backslash and serializes the Escape character. Is the number is wrong, how to solve?

  java, question

Use jackson json to serialize java objects. When the String attribute value contains backslashes, the serialization result is incorrect and contains escape characters. For example:

String str = "\\";
 sysout(list);  //The output is this backslash ["\"]
//Serialization with jackson
 String json = objectMapper.writeValueAsString(list);
 sysout(json);  //The output result has two backslashes ["\ \"]

I would like to ask whether jackson has any solution? Or am I in the wrong posture, and everyone has not encountered this kind of problem?

It’s not very convenient to call a mobile phone, so we’ll settle for it.
Thank you!

java ‘\’ == literal ‘\’ == js ‘\’