mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
refactor: address comments
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
This commit is contained in:
parent
66aabbff25
commit
ba721d4cc5
1 changed files with 2 additions and 2 deletions
|
@ -409,7 +409,7 @@ std::optional<std::string> ConvertJsonPathToJsonPointer(string_view json_path) {
|
||||||
for (const auto& node : path) {
|
for (const auto& node : path) {
|
||||||
const auto& type = node.type();
|
const auto& type = node.type();
|
||||||
if (type == json::SegmentType::IDENTIFIER) {
|
if (type == json::SegmentType::IDENTIFIER) {
|
||||||
pointer += '/' + node.identifier();
|
absl::StrAppend(&pointer, "/"sv, node.identifier());
|
||||||
} else if (type == json::SegmentType::INDEX) {
|
} else if (type == json::SegmentType::INDEX) {
|
||||||
const auto& index = node.index();
|
const auto& index = node.index();
|
||||||
|
|
||||||
|
@ -419,7 +419,7 @@ std::optional<std::string> ConvertJsonPathToJsonPointer(string_view json_path) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
pointer += '/' + std::to_string(node.index().first);
|
absl::StrAppend(&pointer, "/"sv, node.index().first);
|
||||||
} else {
|
} else {
|
||||||
VLOG(2) << "Error during conversion of JSONPath to JSONPointer: " << json_path
|
VLOG(2) << "Error during conversion of JSONPath to JSONPointer: " << json_path
|
||||||
<< ". Unsupported segment type.";
|
<< ". Unsupported segment type.";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue