jackyyyyyssss commented on code in PR #2323:
URL: https://github.com/apache/kvrocks/pull/2323#discussion_r1616467507


##########
src/types/json.h:
##########
@@ -217,6 +217,29 @@ struct JsonValue {
     return results;
   }
 
+  StatusOr<std::vector<size_t>> GetBytes(std::string_view path, 
JsonStorageFormat format,
+                                         int max_nesting_depth = 
std::numeric_limits<int>::max()) const {
+    std::vector<size_t> results;
+    Status s;
+    try {
+      jsoncons::jsonpath::json_query(value, path, [&](const std::string & 
/*path*/, const jsoncons::json &origin) {

Review Comment:
   Hello, I have two questions I would like to ask. 1. When does the status 
initialization fail and needs to be returned in advance? 2. Currently, 
obtaining the byte is still inaccurate, and the actual value should be larger 
than the encoded string. size(). Does this meet the project's standards,Would 
sizeof (std:: string)+str. size() be more accurate?



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

Reply via email to