From 783afeb48a26dd429bd93f3a5480c664f3c9f5cd Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Fri, 24 Nov 2023 12:23:32 -0500 Subject: [PATCH] Doc update --- doc/ref/jsonpath/jsonpath_expression/evaluate.md | 2 ++ doc/ref/jsonpath/jsonpath_expression/update.md | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/ref/jsonpath/jsonpath_expression/evaluate.md b/doc/ref/jsonpath/jsonpath_expression/evaluate.md index 4f40743b33..965429ab5b 100644 --- a/doc/ref/jsonpath/jsonpath_expression/evaluate.md +++ b/doc/ref/jsonpath/jsonpath_expression/evaluate.md @@ -15,6 +15,8 @@ normalized path expressions. (2) Evaluates the root value against the compiled JSONPath expression and calls a provided callback repeatedly with the results. +Note: This function is kept for backwards compatability. New code should use the [select](select.md) function. + #### Parameters diff --git a/doc/ref/jsonpath/jsonpath_expression/update.md b/doc/ref/jsonpath/jsonpath_expression/update.md index e64eb46c5c..8575564fdb 100644 --- a/doc/ref/jsonpath/jsonpath_expression/update.md +++ b/doc/ref/jsonpath/jsonpath_expression/update.md @@ -23,6 +23,8 @@ It must have function call signature equivalent to
+The callback receives nodes with duplicates removed, and paths sorted in descending order. + ### Examples #### Update in place @@ -41,7 +43,7 @@ int main() std::ifstream is(/*path_to_books_file*/); json doc = json::parse(is); - auto callback = [](const jsonpath::path_node& /*location*/, json& book) + auto callback = [](const jsonpath::path_node& /*path*/, json& book) { if (book.at("category") == "memoir" && !book.contains("price")) {