问题:
解决
使用System.Text.Json.JsonSerializer序列化dto为字符串时,要传入如下配置
//解决中文存入数据库后变成UTF-8编码的问题
private JsonSerializerOptions _jsonSerializerOptions = new JsonSerializerOptions
{
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
WriteIndented = true
};
效果:
标签:编码,栏位,utf,数据表,oracle,JsonSerializerOptions From: https://www.cnblogs.com/jasperchen/p/17999230