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:43:28 UTC

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

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


##########
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:
   I am afraid we cant use the standard way because the json is not standard, the change have already handled both stardard hand non-stardard 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