修复JSON序列化HTML实体参数错误问题

This commit is contained in:
白茶清欢 2023-12-01 18:47:03 +08:00
parent 0d2a068178
commit 2a8ebdc569

View File

@ -72,7 +72,7 @@ func (oj *ownJSON) UnmarshalWithNumberForString(input string, receiver interface
func (oj *ownJSON) MarshalForByte(input interface{}) []byte {
buffer := bytes.NewBuffer([]byte{})
encoder := json.NewEncoder(buffer)
encoder.SetEscapeHTML(true)
encoder.SetEscapeHTML(false)
_ = encoder.Encode(input)
return buffer.Bytes()
}