Search in sources :

Example 1 with JsonpCharacterEscapes

use of com.fasterxml.jackson.core.util.JsonpCharacterEscapes in project jackson-core by FasterXML.

the class JsonpCharacterEscapesTest method testGetEscapeSequenceOne.

@Test
public void testGetEscapeSequenceOne() {
    JsonpCharacterEscapes jsonpCharacterEscapes = JsonpCharacterEscapes.instance();
    assertEquals(new SerializedString("\\u2028"), jsonpCharacterEscapes.getEscapeSequence(0x2028));
}
Also used : SerializedString(com.fasterxml.jackson.core.io.SerializedString) JsonpCharacterEscapes(com.fasterxml.jackson.core.util.JsonpCharacterEscapes) Test(org.junit.Test)

Example 2 with JsonpCharacterEscapes

use of com.fasterxml.jackson.core.util.JsonpCharacterEscapes in project jackson-core by FasterXML.

the class JsonpCharacterEscapesTest method testGetEscapeSequenceTwo.

@Test
public void testGetEscapeSequenceTwo() {
    JsonpCharacterEscapes jsonpCharacterEscapes = JsonpCharacterEscapes.instance();
    assertEquals(new SerializedString("\\u2029"), jsonpCharacterEscapes.getEscapeSequence(0x2029));
}
Also used : SerializedString(com.fasterxml.jackson.core.io.SerializedString) JsonpCharacterEscapes(com.fasterxml.jackson.core.util.JsonpCharacterEscapes) Test(org.junit.Test)

Aggregations

SerializedString (com.fasterxml.jackson.core.io.SerializedString)2 JsonpCharacterEscapes (com.fasterxml.jackson.core.util.JsonpCharacterEscapes)2 Test (org.junit.Test)2