jamesge commented on issue #1775:
URL: 
https://github.com/apache/incubator-brpc/issues/1775#issuecomment-1146777734

   > 我现在直接把这个字符串直接做json load是没有边界问题的. 我看了下文档,只有消息体非常大的时候才有边界问题?
   
   这个就属于理论上是错的,但并不是每时每刻都会发生。如果是线上服务,还是建议做正确了比较好,否则追查偶现的bug会耗费更多的时间。
   
   brpc中带一个json2pb,支持用pb 
message来解析json,之前要求输入只包含一个json,现在我更新了下,可以支持多个json了(需要把Json2PbOptions.allow_remaining_bytes_after_parsing设为true后,默认false),例子可以参考https://github.com/apache/incubator-brpc/blob/master/test/brpc_protobuf_json_unittest.cpp#L1563
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to