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

---
 micronode.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/micronode.go b/micronode.go
index 9d329fd..ac96b52 100644
--- a/micronode.go
+++ b/micronode.go
@@ -3,9 +3,9 @@
 import (
 	"basic.com/valib/c_bhomebus.git/proto/source/bhome_msg"
 	"context"
-	"encoding/json"
 	"errors"
 	"fmt"
+	jsoniter "github.com/json-iterator/go"
 	"os"
 	"sync"
 	"time"
@@ -111,6 +111,7 @@
 
 	ms.printLog("1:", time.Since(t))
 	t = time.Now()
+	var json = jsoniter.ConfigCompatibleWithStandardLibrary
 	rb, _ := json.Marshal(request)
 	msgR := &bhome_msg.MsgRequestTopic{
 		Topic: []byte(request.Path),
@@ -121,6 +122,7 @@
 }
 
 func (ms *MicroNode) RequestTopic(serverId string, request Request, milliSecs int) (*Reply, error) {
+	var json = jsoniter.ConfigCompatibleWithStandardLibrary
 	rb, _ := json.Marshal(request)
 	msgR := &bhome_msg.MsgRequestTopic{
 		Topic: []byte(request.Path),
@@ -161,6 +163,7 @@
 	if ms.handlers == nil {
 		return
 	}
+	var json = jsoniter.ConfigCompatibleWithStandardLibrary
 
 	var reqBody Request
 	var ri *Reply

--
Gitblit v1.8.0