diff --git a/result.go b/result.go index b9f5cda..198a4e9 100644 --- a/result.go +++ b/result.go @@ -8,6 +8,8 @@ package rpc import ( + "bytes" + "encoding/json" "errors" "github.com/tidwall/gjson" "strings" @@ -58,7 +60,9 @@ type result struct { // // Date : 18:34 2022/6/30 func (r *result) ParseJSON(inputContent []byte, receiver interface{}) error { - return nil + decoder := json.NewDecoder(bytes.NewReader(inputContent)) + decoder.UseNumber() + return decoder.Decode(receiver) } // ParseYaml 解析yaml数据