PragmaTwice commented on code in PR #1840:
URL: https://github.com/apache/kvrocks/pull/1840#discussion_r1367572930
##########
src/types/json.h:
##########
@@ -22,35 +22,76 @@
#include <jsoncons/json.hpp>
#include <jsoncons/json_error.hpp>
+#include <jsoncons/json_options.hpp>
#include <jsoncons_ext/jsonpath/json_query.hpp>
+#include <jsoncons_ext/jsonpath/jsonpath_error.hpp>
+#include <limits>
-#include "jsoncons_ext/jsonpath/jsonpath_error.hpp"
#include "status.h"
struct JsonValue {
JsonValue() = default;
explicit JsonValue(jsoncons::basic_json<char> value) :
value(std::move(value)) {}
- static StatusOr<JsonValue> FromString(std::string_view str) {
+ static StatusOr<JsonValue> FromString(std::string_view str, int
max_nesting_depth = std::numeric_limits<int>::max()) {
Review Comment:
I think it is like INT_MAX, where do not require a constant variable.
##########
src/types/json.h:
##########
@@ -22,35 +22,76 @@
#include <jsoncons/json.hpp>
#include <jsoncons/json_error.hpp>
+#include <jsoncons/json_options.hpp>
#include <jsoncons_ext/jsonpath/json_query.hpp>
+#include <jsoncons_ext/jsonpath/jsonpath_error.hpp>
+#include <limits>
-#include "jsoncons_ext/jsonpath/jsonpath_error.hpp"
#include "status.h"
struct JsonValue {
JsonValue() = default;
explicit JsonValue(jsoncons::basic_json<char> value) :
value(std::move(value)) {}
- static StatusOr<JsonValue> FromString(std::string_view str) {
+ static StatusOr<JsonValue> FromString(std::string_view str, int
max_nesting_depth = std::numeric_limits<int>::max()) {
Review Comment:
I think it is like INT_MAX, which do not require a constant variable.
--
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]