jmespath.cpp
C++ implementation of JMESPath, a query language for JSON http://jmespath.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
jmespath::parser::Parser< T > Class Template Reference

The Parser class parses expressions with the specified grammar. More...

#include <parser.h>

Public Types

using IteratorType = UnicodeIteratorAdaptor
 Iterator type which will be used to instantiate the grammar. More...
 
using GrammarType = T< IteratorType, encoding::space_type >
 The type of the grammar that will be instantiated. More...
 
using ResultType = typename GrammarType::start_type::attr_type
 The type of the result of parsing. More...
 

Public Member Functions

ResultType parse (const String &expression)
 Parses the given expression. More...
 

Private Attributes

GrammarType m_grammar
 Grammar object used for parsing. More...
 

Detailed Description

template<template< typename, typename > class T>
class jmespath::parser::Parser< T >

The Parser class parses expressions with the specified grammar.

Template Parameters
TGrammar type to use for parsing

Member Typedef Documentation

template<template< typename, typename > class T>
using jmespath::parser::Parser< T >::GrammarType = T<IteratorType, encoding::space_type>

The type of the grammar that will be instantiated.

template<template< typename, typename > class T>
using jmespath::parser::Parser< T >::IteratorType = UnicodeIteratorAdaptor

Iterator type which will be used to instantiate the grammar.

template<template< typename, typename > class T>
using jmespath::parser::Parser< T >::ResultType = typename GrammarType::start_type::attr_type

The type of the result of parsing.

Member Function Documentation

template<template< typename, typename > class T>
ResultType jmespath::parser::Parser< T >::parse ( const String expression)
inline

Parses the given expression.

Parameters
[in]expressionJMESPath search expression encoded in UTF-8
Returns
The result of parsing the expression. The result's type is the same as the attribute type of the start rule in the specified grammar.
Exceptions
SyntaxError

Member Data Documentation

template<template< typename, typename > class T>
GrammarType jmespath::parser::Parser< T >::m_grammar
private

Grammar object used for parsing.


The documentation for this class was generated from the following file: