You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/06/17 03:03:50 UTC

[GitHub] [rocketmq-client-go] zhouxinyu commented on a diff in pull request #846: [ISSUE #845] support standard json

zhouxinyu commented on code in PR #846:
URL: https://github.com/apache/rocketmq-client-go/pull/846#discussion_r899723643


##########
internal/route.go:
##########
@@ -558,7 +558,8 @@ func (routeData *TopicRouteData) decode(data string) error {
 				if i < 0 {
 					continue
 				}
-				id, _ := strconv.ParseInt(str[0:i], 10, 64)
+				brokerId := strings.ReplaceAll(str[0:i], "\"", "")
+				id, _ := strconv.ParseInt(brokerId, 10, 64)

Review Comment:
   Can we deserialize JSON string in a standard way? Make the SDK could handle both the two formats.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org