| 663 | } |
| 664 | |
| 665 | StatusOr<std::vector<std::string>> ConvertToResp(std::string_view path, redis::RESP resp) const { |
| 666 | std::vector<std::string> json_resps; |
| 667 | try { |
| 668 | jsoncons::jsonpath::json_query(value, path, [&](const std::string & /*path*/, const jsoncons::json &origin) { |
| 669 | std::string json_resp; |
| 670 | TransformResp(origin, json_resp, resp); |
| 671 | json_resps.emplace_back(json_resp); |
| 672 | }); |
| 673 | } catch (const jsoncons::jsonpath::jsonpath_error &e) { |
| 674 | return {Status::NotOK, e.what()}; |
| 675 | } |
| 676 | |
| 677 | return json_resps; |
| 678 | } |
| 679 | |
| 680 | JsonValue(const JsonValue &) = default; |
| 681 | JsonValue(JsonValue &&) = default; |