Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 866 Bytes

search.md

File metadata and controls

44 lines (32 loc) · 866 Bytes

jsoncons::jmespath::search

#include <jsoncons_ext/jmespath/jmespath.hpp>

template<Json>
Json search(const Json& doc, 
            const Json::string_view_type& expr); (1)

template<Json>
Json search(const Json& doc, 
            const Json::string_view_type& expr,
            std::error_code& ec); (2)

Returns a Json value.

Parameters

doc Json value
expr JMESPath expression
ec out-parameter for reporting errors in the non-throwing overload

Return value

Returns a Json value.

Exceptions

(1) Throws a jmespath_error if JMESPath evaluation fails.

(2) Sets the out-parameter ec to the jmespath_error_category if JMESPath evaluation fails.