-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/synk/meeteam/global/util/UnescapedFieldSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package synk.meeteam.global.util; | ||
|
||
import com.fasterxml.jackson.core.JsonGenerator; | ||
import com.fasterxml.jackson.databind.JsonSerializer; | ||
import com.fasterxml.jackson.databind.SerializerProvider; | ||
import java.io.IOException; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
public class UnescapedFieldSerializer extends JsonSerializer<String> { | ||
|
||
@Override | ||
public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException { | ||
// HTML escaping을 하지 않고 그대로 출력 | ||
gen.writeRawValue("\"" + value + "\""); | ||
} | ||
} | ||
|