From bb8b8ac4ce9d4a5566f271cb5fdc05e77ab331c6 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期五, 19 一月 2024 09:09:35 +0800
Subject: [PATCH] replace json lib

---
 hbusc.go |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hbusc.go b/hbusc.go
index 3146286..3b8901f 100644
--- a/hbusc.go
+++ b/hbusc.go
@@ -7,7 +7,7 @@
 	// "encoding/json"
 	"errors"
 	"fmt"
-	json "github.com/json-iterator/go"
+	jsoniter "github.com/json-iterator/go"
 	"os"
 	"sync"
 	"time"
@@ -263,6 +263,7 @@
 	dest := bhome_msg.BHAddress{}
 	if bhsgo.Request(&dest, req, &pid, &mrt, milliSecs) {
 		var reply Reply
+		var json = jsoniter.ConfigCompatibleWithStandardLibrary
 		if err := json.Unmarshal(mrt.Data, &reply); err != nil {
 			h.printLog("bhsgo.Request ret true, but unmarshal err:", err, " mrt.Data:", string(mrt.Data))
 			return nil, err
@@ -295,6 +296,7 @@
 }
 
 func (h *BHBus) Reply(src unsafe.Pointer, i *Reply) error {
+	var json = jsoniter.ConfigCompatibleWithStandardLibrary
 	data, err := json.Marshal(i)
 	if err != nil {
 		return err

--
Gitblit v1.8.0