| 712 | } |
| 713 | |
| 714 | void union_example() |
| 715 | { |
| 716 | std::ifstream is("./input/store.json"); |
| 717 | jsoncons::json store = jsoncons::json::parse(is); |
| 718 | |
| 719 | std::string path = "$.store.book[0:2,-1,?(@.author=='Herman Melville')].title"; |
| 720 | auto result1 = jsonpath::json_query(store, path); |
| 721 | std::cout << "(1) " << result1 << "\n\n"; |
| 722 | |
| 723 | auto result2 = jsonpath::json_query(store, path, jsonpath::result_options::path); |
| 724 | std::cout << "(2) " << result2 << "\n\n"; |
| 725 | } |
| 726 | |
| 727 | void parent_operator_example() |
| 728 | { |
no test coverage detected