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:37:36 UTC

[GitHub] [rocketmq] lizhanhui commented on pull request #4473: Generate legal JSON response conditionally

lizhanhui commented on PR #4473:
URL: https://github.com/apache/rocketmq/pull/4473#issuecomment-1158456257

   @dongeforever Almost all JSON libraries accept standard JSON only. All JSON libraries for C++ including RapidJSON, jsoncpp, protobuf-json-util, etc. json-go is also true and this is why they parse the response manually. Most popular rust crate serde is exactly same. Java libraries are kind of tolerant, Gson/jackson may tolerate some illegal json produced by FastJSON, but not all (For cases of objects as key, they are not able to tolerate).
   
   Current C++ SDK suffers core-dump from time to time,  one of the root causes is some undefined behavior when parsing illegal JSON output.   
   
   So there is no problem of "they may need to use two different json library.", their problem, however, is that they cannot use a production ready library and are forced to parse manually, the action itself is error-prone.  See the pasted go snippet in the issue.
   


-- 
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