Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 1.95 KB

File metadata and controls

59 lines (44 loc) · 1.95 KB

jsoncons::jmespath::jmespath_expression

#include <jsoncons_ext/jmespath/jmespath.hpp>

template <typename Json>
class jmespath_expression

Member types

Type Definition
char_type Json::char_type
string_type std::basic_json<char_type>

Member functions

Json evaluate(reference doc) const;                                    (1)

Json evaluate(reference doc, 
    const std::vector<std::pair<std::string,Json>>& params) const;           (until 1.3.1)  
                                                                       (2)
Json evaluate(reference doc, 
    const std::map<string_type,Json>& params) const;                         (since 1.3.1) 
                                                        
Json evaluate(reference doc, std::error_code& ec) const;               (3)
                                                        
Json evaluate(reference doc, 
    const std::vector<std::pair<std::string,Json>>& params,                  (until 1.3.1)
    std::error_code& ec) const;    
                                                                       (4)
Json evaluate(reference doc, 
    const std::map<string_type,Json>& params,                                (since 1.3.1)
    std::error_code& ec) const;    

Parameters

doc Json value
params List of parameters to be provided to an initial (global) scope when the query is evaluated
ec out-parameter for reporting errors in the non-throwing overload

Exceptions

(1),(3) Throws a jmespath_error if JMESPath evaluation fails.

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