f
This commit is contained in:
@@ -39,6 +39,14 @@ func ProcessYYSY9E4ARequest(ctx context.Context, params []byte, deps *processors
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 兼容上游有时返回 JSON 字符串的情况:如果是字符串则尝试再反序列化一次
|
||||||
|
if str, ok := respData.(string); ok && str != "" {
|
||||||
|
var parsed interface{}
|
||||||
|
if err := json.Unmarshal([]byte(str), &parsed); err == nil {
|
||||||
|
respData = parsed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 将响应数据转换为JSON字节
|
// 将响应数据转换为JSON字节
|
||||||
respBytes, err := json.Marshal(respData)
|
respBytes, err := json.Marshal(respData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user