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


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

Review Comment:
   What's the meaning of this empty check?
   Could you think about whether an empty JSON array/object will occupy storage 
space?



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