migr: migration json to x.json2

This commit is contained in:
meiseayoung
2025-12-30 12:40:30 +08:00
parent 85b001225e
commit a95485dd25
21 changed files with 223 additions and 145 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ module hono
import os
import time
import json
import x.json2
// 日志级别枚举
pub enum LogLevel {
@@ -150,7 +150,7 @@ fn (l &Logger) format_text_log(entry LogEntry) string {
// 格式化日志消息(JSON格式)
fn (l &Logger) format_json_log(entry LogEntry) string {
return json.encode(entry)
return json2.encode[LogEntry](entry)
}
// 写入日志到文件